Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: tim.holman on December 20, 2011, 04:23:12 PM

Title: Freeze Fsm [SOLVED]
Post by: tim.holman on December 20, 2011, 04:23:12 PM
I've been having some difficulty with Fsm's when pausing the game. I'm using "Enable Fsm" to turn the fsm's on and off when switching between Pause and Unpause. This, however, resets the fsm so that it goes back to its starting state when unpaused. I need to have them freeze in there current state when paused, then resume from that state as normal when unpaused. I've looked around the actions list a bit, but couldn't come up with anything. Any suggestions as to how I would go about solving this problem? Thank you in advance!!
Title: Re: Freeze Fsm
Post by: Alex Chouls on December 20, 2011, 07:03:55 PM
The next update will have a flag to control whether an FSM resets or not when disabled/enabled. This should make it a lot easier to pause FSMs without using extra pause states.

Are you on the beta list?
Title: Re: Freeze Fsm
Post by: tim.holman on December 21, 2011, 10:31:13 AM
I'm not on the beta list, however, I would really like to be!
Title: Re: Freeze Fsm
Post by: tim.holman on January 03, 2012, 02:48:05 PM
Thank you so much for beta access! Much appreciated. I have poked around a bit trying to figure how to tag an fsm so that it resumes from the last active state, however, I haven't figured it out yet. Is there an action I need to add to use this functionality? I used the action "Enable Fsm," then I set "Reset on Exit" to true. Now I just need a way to tell the fsm which state to start from when it has been reset. Thank again, you've been a HUGE help!
Title: Re: Freeze Fsm
Post by: Alex Chouls on January 03, 2012, 04:45:13 PM
In the PlayMakerFSM Inspector (in the main Unity Inspector) there's a new check box: "Reset on Disable." Uncheck that, and when the FSM is disabled/enabled it will keep its last state instead of being reset.

It's a new feature, so there might be bugs. Let me know how it goes...
Title: Re: Freeze Fsm
Post by: Alex Chouls on January 14, 2012, 08:21:52 PM
Hi Tim,

Have you had a chance to play with the "Reset on Disable" setting? Does it work the way you'd expect?

Thanks,
Alex
Title: Re: Freeze Fsm
Post by: tim.holman on January 17, 2012, 10:40:42 AM
Alex,
I've used it for three or four fsm's so far, and everything seems to work perfectly. Thank you again, and if I find any sort of bugs or problems, I will be sure to get back to you with them.
Cheers,
Tim
Title: Re: Freeze Fsm
Post by: Alex Chouls on January 24, 2012, 04:30:19 PM
Great! Thanks for the feedback.