reseting game
allc1865
Member, PRO Posts: 777
Hi. I want to create a "retry" button in my pause menu. So every time you go to pause the game, you have "continue", "main menu", and also "reset", but every time you click the reset button, it resets the current scene. How can I get it to reset the game, instead of the current "pause menu" scene.
Any help would be great! Thanks.
Any help would be great! Thanks.
Best Answer
-
-Timo- Posts: 2,313also place this behavior above that change game.reset to false and delay the reset scene with a timer?
after 0.01 seconds (check run to completion)
reset scene
and else post an image of your rule. maybe you did something wrong
Answers
in the pause scene inside the reset button place the behaviors
change attribute game.reset to true
unpause game.
inside the scene (level or something) place an actor with the behaviors
rule
if game.reset is true
change game.reset to false
reset scene.
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
If you don't want to use the standard reset behaviours you will need to go with a similar approach to what @timolapre1998 says. Have an attribute to say if the game needs resetting, and if it's true, add in all of the change attributes you need to reset scores, lives and whatnots, and then change to another scene.
Any way to fix this?
also in the actor that has
rule
if game.reset is true
change game.reset to false
reset scene.
also place a change attribute scores to 0 (make sure its above the reset scene behavior)
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
I did, change attribute > game.Score to 0, and placed it above my Reset Scene...
It didn't work.
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
After 0.01 seconds run to completion
Change game.game reset to false
Hope this helps
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮