resetting score after pressin pause and retry
![app-etite](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
hi guys,
I have used gamesalads pause feature to pause my game, and on the pause screen i have a retry button.
When I press retry it reloads the scene ok but the score still remains. how can I also reset the score back to zero again?
Thanks
-appetite games
I have used gamesalads pause feature to pause my game, and on the pause screen i have a retry button.
When I press retry it reloads the scene ok but the score still remains. how can I also reset the score back to zero again?
Thanks
-appetite games
Comments
But tenrdrmer is right in that if possible you should re-set the scene using other methods like recycling ... in which case you will need unpause (if you use pause to get to the reset button).
So there might not be much in it
1. have an actor called something like levelgenerator
2. in levelgenerator have it spawn all the scene actors on a trigger such as level1=true (if you dont have a problem with spawn)
3. create a game attribute called reset
4. make sure all actors (that levelgenerator spawns) have a rule that destroys them when reset=true
5. when reset=true also change level1=false, then level1=true and the level will begin from scratch without any load times
6. put your reset button on the scene along with the levelgenerator actor. when reset button touched then reset=true
you will need to add some change attributes to clear scores etc on reset=true and dont forget to make reset=false before level1=true otherwise you'll get a blank screen!
sorry that was typed quickly so hope it makes sense. This will save on scene changing. But there are other (probably better) methods. This works for me though