playMaker

Author Topic: Return to previous state? [SOLVED]  (Read 5063 times)

jasonlee

  • Playmaker Newbie
  • *
  • Posts: 12
Return to previous state? [SOLVED]
« 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.
« Last Edit: October 05, 2011, 01:59:36 PM by alexchouls »

theBrandonWu

  • Playmaker Newbie
  • *
  • Posts: 18
    • Studio Pepwuper
Re: Return to previous state?
« Reply #1 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...
Studio Pepwuper: http://www.pepwuper.com
One Month Game School (now on SkillShare): https://www.skillshare.com/r/user/thebrandonwu

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Return to previous state?
« Reply #2 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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Return to previous state?
« Reply #3 on: September 14, 2011, 12:36:37 PM »
1.2 has a new Goto Previous State action that should make this easier!
« Last Edit: September 15, 2011, 12:23:03 PM by alexchouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Return to previous state?
« Reply #4 on: September 15, 2011, 01:27:29 AM »
there you go... :)

theBrandonWu

  • Playmaker Newbie
  • *
  • Posts: 18
    • Studio Pepwuper
Re: Return to previous state?
« Reply #5 on: September 15, 2011, 11:50:06 AM »
Awesome thanks!! Updating today!
Studio Pepwuper: http://www.pepwuper.com
One Month Game School (now on SkillShare): https://www.skillshare.com/r/user/thebrandonwu