Code to fully reset the application?

Hey everyone,

Anyone know a code that will fully reset the application from scratch without having to reset scores, positions or whatever? Looked through all the API’s but not seen anything yet?

Thanks
Ace [import]uid: 9899 topic_id: 3137 reply_id: 303137[/import]

For game play’s there is really no API to reset the app. You will need to write your own reset function that resets the game play but the score.

you can have something like

gameReset()  
 sheep.x = 0;  
 scissors.location = 0;  
....etc.  
end  

And then you can have another function to reset all including gamescore

gameResetAll()  
 gameReset()  
 gameScore = 0;  
 gameTextScore = 0  
end  

Just using pseudo code to give you an idea.

Look in the Samurai Kitchen example when the program ends… just don’t reset the game score…

carlos [import]uid: 24 topic_id: 3137 reply_id: 9198[/import]

Hey Carlos,

Thanks for the suggestion

Is there no way to reset as if you have pressed cmd + R?

My game (the sheep one) is complete now apart from the reset and to save and recall a high score. Even looking through different documentation, I’m stumped.

The reset after gameover won’t happen because of where my functions lie I don’t think?

Ace [import]uid: 9899 topic_id: 3137 reply_id: 9199[/import]