playMaker

Author Topic: Set action in another fsm  (Read 1782 times)

adamt

  • Playmaker Newbie
  • *
  • Posts: 14
Set action in another fsm
« on: April 23, 2015, 12:38:07 PM »
As the title says, I was wondering if it was possible to enable/disable an action in another fsm.

I have my PlaymakerGUI fsm displaying a texture overlay when in one of my states, and I need to disable the texture when I'm in another state, in another fsm...

It's action specific too, so turning the entire state off wouldn't work.

Sound possible?

Thanks

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Set action in another fsm
« Reply #1 on: April 23, 2015, 01:26:47 PM »
You can use the Send Event action to do this or you use the "set fsm" variable actions to flip a bool in the other FSM or something like that as well
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

redikann

  • Full Member
  • ***
  • Posts: 174
Re: Set action in another fsm
« Reply #2 on: April 23, 2015, 01:28:32 PM »
A quick way would be to just duplicate the particular state and remove the fsm texture gui action. Then set it up so your other object can make the FSM toggle between the 2 states when necessary.

adamt

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Set action in another fsm
« Reply #3 on: April 24, 2015, 11:23:51 AM »
Thanks for the replies. So many ways you can do something in Playmaker!

I ended up doing it in a quite hacky way... I set the draw textures texture to a variable, then just switched it to none when I wanted it turned off. Probably not very efficient, but it's only a prototype I'm working on :)