playMaker

Author Topic: Multi Condition Action  (Read 965 times)

MakeANiceGame

  • Playmaker Newbie
  • *
  • Posts: 4
Multi Condition Action
« on: October 18, 2019, 01:11:54 AM »
For example, I have 3 game object compare in a state, they are set up to send the same event  ... so the event will only be sent when which situation? All of 3 actions meet them condition or only 1 of 3 meets then the event will be sent? 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Multi Condition Action
« Reply #1 on: October 18, 2019, 05:10:43 AM »
Hi,

 If your event is a transition of that state or a global transition on that fsm, it will exit the state as soon as the event is fired, so if it's the first action, then second and third will not be executed.

If your even is global and you have a set event target before that targets another fsm, then all three action will fire their event, and if it's the same event, then other fsm will receive that event 3 times.

Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Multi Condition Action
« Reply #2 on: October 18, 2019, 06:57:30 AM »
Hi.
Just giving some addition info.

in you setup any 'true' will send the event.

If for example you want all 3 to meet the condition.

Then instead of sending an event, use the 'Store Result' it will store a bool value (call the variable object 1/2/3 for example).

Do this for each action.

Then below that you can use a 'Bool All True' action and place the stored bool variables.
Then set the event on this action.

if you want some true and some false, then try the action "bool multi condition"
you can find it on the Ecosystem