playMaker

Author Topic: Combining conditions for transitions  (Read 2823 times)

Divide

  • Playmaker Newbie
  • *
  • Posts: 1
Combining conditions for transitions
« 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

markinjapan

  • Full Member
  • ***
  • Posts: 103
Re: Combining conditions for transitions
« Reply #1 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 :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Combining conditions for transitions
« Reply #2 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

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

 Bye,

 Jean