Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ViRiX Dreamcore on September 19, 2014, 07:59:44 PM

Title: Changing States of another FSM??[SOLVED]
Post by: ViRiX Dreamcore on September 19, 2014, 07:59:44 PM
I know this seems obvious, but it seems like there should be an action for this.

I have four buttons. When I press one down, I want the others to deactivate. Not actually deactivate the object, but just have the buttons go back to the other state.

I've tried using the State Switch, but it doesn't look like there's a way to call an event in another FSM.

So how would I do this?

I just want to say something like "when the On state of button 1 is active, set the states in buttons 2, 3, and 4 to OFF state." And similar logic for the other buttons.

How would I go about doing that??

Also, it'd be really great if there was a simple "Set FSM State" action. Why is that not there? I see a Get FSM State.
Title: Re: Changing States of another FSM??
Post by: jess84 on September 19, 2014, 08:06:56 PM
Send Event action.

On your FSM for each button, have a state that turns it Off. Create a global event and connect that global event to this state.

Use broadcast all + 'exclude' self and it'll be sent to your other objects and not the current one.
Title: Re: Changing States of another FSM??
Post by: ViRiX Dreamcore on September 19, 2014, 09:50:55 PM
EDIT AGAIN

Ok I got it working!

That event send action has to be right at the top.

Thanks for your help.