ResetGame in game initialization
fstltna
Member Posts: 96
I want to create some code that gets called when the game is reset, where would I put this? I set a Boolean that says whether the game was being reset or not, but I don't know where to put the glue code to do the actual reset process...
Marisa
Marisa
Comments
http://gamesalad.com/wiki/behaviors_reference:reset_game
Is this what you mean?
_______________
Nesen Probe http://itunes.apple.com/us/app/nesen-probe/id377766693?mt=8
Tickle Stones http://itunes.apple.com/us/app/tickle-stones/id363484260?mt=8
Food Fight! (free) http://itunes.apple.com/us/app/food-fight/id352646643?mt=8
Marisa
Then put your collection of code into a Rule, like this:
Rule
When all conditions are valid:
game.pleaseResetNow = true
-----Change Attribute game.pleaseResetNow To: false
-----[collection of reset code goes here]
Now, when something in the game triggers game.pleaseResetNow to be true, the code inside that Rule will execute.
Marisa