Save and Retrieve a Score at iPad
by Claudio Torres · in iTorque 2D · 06/16/2011 (5:59 pm) · 3 replies
My first iTorque 1.4.1 Game is ready for publishing, BUT I would like to implement a Best Score functionality since version 1.
I need a short code to Save my $bestScore variable at the end of each level, and restore it at the start of the game. This will allow the player to remember its best score even when finish the game to play latter.
Can anyone help me with a short code to save and restore a iTorque global variable $bestScore at iPad?
Thanks
I need a short code to Save my $bestScore variable at the end of each level, and restore it at the start of the game. This will allow the player to remember its best score even when finish the game to play latter.
Can anyone help me with a short code to save and restore a iTorque global variable $bestScore at iPad?
Thanks
About the author
Electronic Engineer, MSc on System, Software Developer, Digital Marketing Consultant. Today I managing Torres Studios, a new Game and Entertainment Studio focus on create innovative iPad and XBOX 360 Games.
Simon Almqvist Pettersson
Dohi Sweden
iPhoneSaveStringToDevice(%placeName, %value);
and the following to load it:
iPhoneLoadStringFromDevice(%placeName);
So in your case it would be something like this:
saving:
iPhoneSaveStringToDevice("score", $bestScore);
loading:
$bestScore = iPhoneLoadStringFromDevice("score");