Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jasonlee on April 26, 2011, 09:40:00 PM

Title: Return to previous state? [SOLVED]
Post by: jasonlee on April 26, 2011, 09:40:00 PM
Sometimes, when entered a state via global transition, it's necessary to return to previous state when exit. How to achieve that in playmaker? Thanks.
Title: Re: Return to previous state?
Post by: theBrandonWu on September 13, 2011, 08:47:24 PM
I am also wondering if this can be done. I am creating triggers for different states, but would like the state to return to the previous state if possible. Right now I am creating a whole bunch duplicated states without being able to do this...
Title: Re: Return to previous state?
Post by: jeanfabre on September 14, 2011, 01:35:12 AM
Hi,
 
 The technic I use for this kind of situation is to create a flow that can be started from the same state and knows its way around to reach where it left off. Basically, when I have a series of actions, I check if I need to do it, else continue, therefore I always have only one way to trigger my actions: from the top. Then if for any reasons it's interrupted, I simply call the top state.

Else, you could maybe explain the exact feature that you want to create, we'll certainly find a working solution for you.

Bye,

 Jean
Title: Re: Return to previous state?
Post by: Alex Chouls on September 14, 2011, 12:36:37 PM
1.2 has a new Goto Previous State action that should make this easier!
Title: Re: Return to previous state?
Post by: jeanfabre on September 15, 2011, 01:27:29 AM
there you go... :)
Title: Re: Return to previous state?
Post by: theBrandonWu on September 15, 2011, 11:50:06 AM
Awesome thanks!! Updating today!