Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: tim.holman on January 13, 2012, 02:41:30 PM
-
I was wondering if anybody knew of an easy way to reset the current level when dying. In other words, all fsm's should reset and start where they normally would at the beginning of the game. I was thinking about disabling, then re enabling all fsm's in the scene, however, I feel like there should be an easier way to go about this. Any ideas would be greatly appreciated!!
-
Try "restart level" action.
Bye
-
I searched for "Restart Level" and didn't see anything. Is this a new action? Would "Load Level" essentially be the same thing? I'm using Playmaker 2.2 (beta 10). I believe Alex sent me an updated beta, however, I have not had time to implement yet. Thank you for your help.
-
Sebastiao is probably talking about this action:
http://hutonggames.com/playmakerforum/index.php?topic=800.0
-
You can make it with Load Level action and you set the same level.
But if you search in this forum Restart Level, you will find the action.
Bye
-
Sebastiao is probably talking about this action:
http://hutonggames.com/playmakerforum/index.php?topic=800.0
Yes yes it´s.
Bye
-
Isn't this essentially the same as "Load Level" or "Load Level Num"? What's the difference?
-
Yes. It's just for convenience really, so you don't have to store the name of the current level.
Reloading the level is probably the best/easiest way to make sure everything resets properly (physics etc.).
But it might make sense for Playmaker to have some high level call for this (e.g., ResetAllFSMs). I'll look into it...
-
Just had to implement this exact thing today and this is what I came up with.
Create a global variable int that can be used to set which level you are on.
Create a new empty scene (I named mine resetter) and create an int switch based on the global var that points to each level. The level transitions just have load movie on them and draw fullscreen colour to keep the screen black.
The player dies and hits the restart level button.
The button sets the global variable for which point in the game they are at. Level 1 = 1 and so on.
It then fades to black and loads the resetter scene.
-
I try restartlevel.cs ,but it will not reset all my variables,and it seem not to make all objects reseting.
how can I reset my all variables to default,and make all itween stop,and all gameobjects init to default.
thanks a lot.
-
I have used Restart Level in the past without any problems.
In my project it works without problems, however when I make a build and I do a restart... the level restarts wierdly... I see a white screen.
Any ideas? thanks