playMaker

Author Topic: help with getting diagonals[SOLVED]  (Read 1287 times)

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
help with getting diagonals[SOLVED]
« on: January 13, 2020, 04:35:20 AM »
In my FSM when i press the up d-pad key I set a UP bool true. When I press the d-pad right I set a RIGHT bool true.

I have the following events Up, Right and UP-RIGHT.

I require Up to fire if you only press this direction the same with left.

But I can't atm find a way to get the UP-RIGHT direction.

Is there a way to do this?

« Last Edit: January 16, 2020, 11:44:52 AM by colpolstudios »

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with getting diagonals
« Reply #1 on: January 13, 2020, 06:02:24 PM »
thought id add some further details.

Using playmaker I have been able to detect the input of a PlayStation controller on WEB GL for the d-pad. Currently, I am able to get up, down, left and right.
But the way I have achieved this currently will not allow for up-right directions.

There must be some way to check if it pressing both directions.

I have employed an onscreen display and it does show the two keys pressed at the same time, but It's impossible for me to think of a way to check this condition as I need to check if only moving up or right to move only in these directions, but pressing up-right together would allow the diagonal movement.

I do not think this is possible, but maybe there is a way?

« Last Edit: January 13, 2020, 06:05:49 PM by colpolstudios »

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Re: help with getting diagonals
« Reply #2 on: January 13, 2020, 08:31:40 PM »
I think you can get it done using the Horizontal and Vertical axis float.
By checking/testing:
if horizontalAxis >0.1 , verticalAxis >0,1; then UpRight = true.

Then just do the same test in other diagonal direction.
Hope it helps.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: help with getting diagonals
« Reply #3 on: January 14, 2020, 02:14:26 AM »
Hi,

 there is a custom action AxisEventExtended that will help you get that and sends event for up down, left right, but also for diagonals.

Bye,

 Jean

colpolstudios

  • Sr. Member
  • ****
  • Posts: 370
Re: help with getting diagonals
« Reply #4 on: January 14, 2020, 05:05:19 AM »
AxisEventExtended will not work in my case. Could I pm you in relation to my issue with getting the diagonals for a PlayStation controller d-pad web GL?

kind regards

colpolstudios

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: help with getting diagonals
« Reply #5 on: January 14, 2020, 11:21:17 AM »
Hi,

 Sure.

Bye,

 Jean