Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MakeANiceGame on October 18, 2019, 01:11:54 AM

Title: Multi Condition Action
Post by: MakeANiceGame 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? 
Title: Re: Multi Condition Action
Post by: jeanfabre 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
Title: Re: Multi Condition Action
Post by: djaydino 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 (https://hutonggames.fogbugz.com/default.asp?W1181)