playMaker

Author Topic: Anyway of comparing float and use AND operator?  (Read 256 times)

hoyoyo80

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Anyway of comparing float and use AND operator?
« on: September 15, 2018, 03:26:45 PM »
Hi,

is there a way to compare multiple float in one event and then use AND operator after comparison?

E.g Float A>0 and Float B>0 then send event

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: Anyway of comparing float and use AND operator?
« Reply #1 on: September 15, 2018, 11:26:43 PM »
Hi.
You can use 2 Float Compare and set the state in 'action sequence' (right click on empty space in the state window to select action sequence)

In the 1st compare if greater, do nothing. then it will check the 2nd compare.
if you do not set action sequence you can have wrong behavior.

if sequence is active each action will not start if the previous one is not yet finished.
if sequence is NOT active each action will start from top to bottom, but it will not wait for the actions to finish.

Here you can see a setup (the v in the line between the actions shows that sequence is active) :


hoyoyo80

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Anyway of comparing float and use AND operator?
« Reply #2 on: September 16, 2018, 02:29:49 AM »
Thanks. Actually im implementing 8 direction control. Im using get axis and store the value in inputX and inputY floats. Im going to compare inputX and inputY to determine diagnol direction

I never know that action sequencer exist but its look like it will be applied to all action in the event.


Thore

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: Anyway of comparing float and use AND operator?
« Reply #3 on: September 16, 2018, 04:46:16 AM »
Hi.
You can use 2 Float Compare and set the state in 'action sequence' (right click on empty space in the state window to select action sequence) ...

Amazing! I use Playmaker for quite a while and did not know about the Action Sequence functionality. Thanks a lot!

Need more accessible intermediary/advanced-level documentation :)

hoyoyo80

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Anyway of comparing float and use AND operator?
« Reply #4 on: September 16, 2018, 05:36:50 AM »
I need more explanation on the diagram posted. Care to explain?
Thanks

hoyoyo80

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Anyway of comparing float and use AND operator?
« Reply #5 on: September 16, 2018, 04:58:11 PM »
Ok... Tried n working😊

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 3664
    • View Profile
    • jinxtergames
Re: Anyway of comparing float and use AND operator?
« Reply #6 on: September 16, 2018, 10:04:42 PM »
Hi.
For 8 way axis.
There is an action on the Ecosystem called 'Axis Event Extended'
Which handles 8 way events. maybe it can be useful for you

hoyoyo80

  • Playmaker Newbie
  • *
  • Posts: 28
    • View Profile
Re: Anyway of comparing float and use AND operator?
« Reply #7 on: September 18, 2018, 12:54:07 AM »
There is something like that?Ill take a look:) Thanks