Lifetime death counter
Chr0nos
Wondering Vagabond AustraliaMember Posts: 113
Hi guys,
I am wanting to add a death counter that counts all the deaths of a player over the lifetime of the game. In other words, I want the app to store every single death the player has ever had, and be able to display this in a scene somewhere. Does anyone know of any good tutorials where this is shown?
Thank you!
Comments
Set up your rules as follows:
Load attribute game.deaths [key:deaths]
When [condition for player death]
.....Change Attribute game.deaths to game.deaths+1
.....Save attribute game.deaths [key:deaths]
Use a Display Text behavior to show game.deaths.
If you still need a tutorial, Google gamesalad high score. It's essentially the same process.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
You are a legend tatiang, thank you so much!
@tatiang, that worked beautifully.
I just have one more question.
The counter only keeps track of the number of deaths as long as I'm in the preview mode. When I exit the preview, and start it again, the counter is reset to 0. So is it actually saving the deaths forever (eg. can the user exit the app and come back later to find the deaths still counting up) or is it only counting the deaths for that play through?
Thank you for your help!
the previewer doesn't save attributes and timers.
You have to make an adhoc version to test if it works properly on your device.
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Ahhh I see. Thank you BigDave.
How do I make an adhoc version? Is that where you upload it to GS?