playMaker

Author Topic: pause playmaker?  (Read 8432 times)

yaozhe999

  • Playmaker Newbie
  • *
  • Posts: 1
pause playmaker?
« on: December 14, 2011, 10:36:50 PM »
how can I pause playmaker?
I'm working on a 2D action game, and when I press esc key I want to pause the game to show menu,but I can't find a way to pause playmakerFsm...
so is there any way to pause playmakerFsm on its current state and resume ?

kinetiknz

  • Junior Playmaker
  • **
  • Posts: 85
Re: pause playmaker?
« Reply #1 on: December 18, 2011, 04:07:12 PM »
Hey, have an FSM that has these:

Action1:
-Wait for key down - ESC

Action2:
-Scale time - 0
-Send event -link to your HUD FSM to enable it.

fromfame

  • Junior Playmaker
  • **
  • Posts: 78
  • Sloppy PM Veteran
Re: pause playmaker?
« Reply #2 on: May 24, 2018, 06:12:12 PM »
There currently is a solution

PlayMaker Window>FSM tab (next to State, Events, and Variables Tab)>Untick 'Reset On Disable'


play_edu

  • Full Member
  • ***
  • Posts: 116
Re: pause playmaker?
« Reply #3 on: May 24, 2018, 11:55:08 PM »
 According to fromfame you can Untick 'Reset On Disable' and when you want to pause FSM then disable FSM. when you enable its start with the same state. sorry for my bad English.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: pause playmaker?
« Reply #4 on: May 25, 2018, 08:43:06 AM »
Hi.
There is also a different way :

Make a "Pause" state.
Set a global transition to the state (call it Pause for example)
In the state place the action "Get Previous State Name" and set a variable to store the name.

Then set a transition to another state to un-pause.
In that state place the action "Go To State By Name" (you can find that action on the Ecosystem)

1 difference is that the selected state would restart and not continue (which can be good or bad, depending on your setup)

for example if you would have a wait (3 sec for example) on the action when paused

When you un-pause (and wait would have 1sec left)
The time would count again from 3sec.
While the suggestion from 'fromfame' and 'play_edu'
The time would continue from where it got disabled (1sec)
also the actions that are "Finished" will not be called again.

I think both ways can be useful in different situations so i thought i mentioned this solution also :)