Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: hoyoyo80 on September 15, 2018, 06:26:45 PM

Title: Anyway of comparing float and use AND operator?
Post by: hoyoyo80 on September 15, 2018, 06: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
Title: Re: Anyway of comparing float and use AND operator?
Post by: djaydino on September 16, 2018, 02:26:43 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)

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) :

(https://i.imgur.com/TPOgsSel.png)
Title: Re: Anyway of comparing float and use AND operator?
Post by: hoyoyo80 on September 16, 2018, 05: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.

Title: Re: Anyway of comparing float and use AND operator?
Post by: Thore on September 16, 2018, 07: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 :)
Title: Re: Anyway of comparing float and use AND operator?
Post by: hoyoyo80 on September 16, 2018, 08:36:50 AM
I need more explanation on the diagram posted. Care to explain?
Thanks
Title: Re: Anyway of comparing float and use AND operator?
Post by: hoyoyo80 on September 16, 2018, 07:58:11 PM
Ok... Tried n working😊
Title: Re: Anyway of comparing float and use AND operator?
Post by: djaydino on September 17, 2018, 01:04:42 AM
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
Title: Re: Anyway of comparing float and use AND operator?
Post by: hoyoyo80 on September 18, 2018, 03:54:07 AM
There is something like that?Ill take a look:) Thanks