Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Divide on September 13, 2011, 04:21:49 PM

Title: Combining conditions for transitions
Post by: Divide on September 13, 2011, 04:21:49 PM
Hello,

I'm considering buying playMaker but from the videos and tutorials I'm wondering if its possible to combine conditions together. For example, if we want to have something like:
If X button pressed and variable health greater than 10 - Go to state 'Attack'

I know you could create your own action specifically for that, but I'm wondering if play maker allows any type of evaluation of a transition, or if there's elegant ways around it.

Thanks for reading
Title: Re: Combining conditions for transitions
Post by: markinjapan on September 13, 2011, 07:02:57 PM
Yes, it's very easy to do.

You would just chain the states. So in your example, you would do this:

(X Button Down Event) - > (Is Health equal? greater than? '10' if so then Send Attack event)

It's very, very simple. I urge you to buy Playmaker straight away and start making games :)
Title: Re: Combining conditions for transitions
Post by: jeanfabre on September 14, 2011, 01:41:16 AM
Hi,

MarkinJapan is right. You need to think in terms of flow and more granular checks and actions. Check for a single variable, then check for the second, do something, and so on.

 There is a post showing a complex flow with several checks, conditional statements etc etc. I think it demonstrate what you are after.

http://hutonggames.com/playmakerforum/index.php?topic=614.msg2485#msg2485 (http://hutonggames.com/playmakerforum/index.php?topic=614.msg2485#msg2485)

check out the attached screenshot  "fsmWired" it's a complex diagram flow with several conditional tests and in between actions.

 Bye,

 Jean