playMaker

Author Topic: Changing States of another FSM??[SOLVED]  (Read 1776 times)

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Changing States of another FSM??[SOLVED]
« on: September 19, 2014, 04: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.
« Last Edit: September 23, 2014, 02:23:10 AM by jeanfabre »

jess84

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
Re: Changing States of another FSM??
« Reply #1 on: September 19, 2014, 05: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.

ViRiX Dreamcore

  • Playmaker Newbie
  • *
  • Posts: 22
    • View Profile
Re: Changing States of another FSM??
« Reply #2 on: September 19, 2014, 06: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.
« Last Edit: September 19, 2014, 07:09:38 PM by ViRiX Dreamcore »