save levels - salvare livelli

hello all, I would like to know if I have a game with many levels, how can I save the position without having to start from scratch?
thanks to all
ciao a tutti, vorrei sapere, se ho un gioco con molti livelli, come posso salvare la posizione senza dovere iniziare da capo?
grazie a tutti
thanks to all
ciao a tutti, vorrei sapere, se ho un gioco con molti livelli, come posso salvare la posizione senza dovere iniziare da capo?
grazie a tutti
Comments
you must create an attribute to store the level state, for example a bool and set it to true when level is complete.
After this you must save your attribute with SaveAttribute behaviour
ti devi creare un attributo per ogni livello (game attribute) per esempio booleano settato a false.
Quando completi il livello lo metti a true e salvi il tuo attributo
Hope that helps.
Rich
It involves the use of the Save and Load attributes to save the level to go to next time a user plays the app. (You can save in themiddle of a level as well, but will need more attributes to save). So:
Make a text attribute called GoLevel. Place an actor on-screen but outside of the playing area on every scene you have.
In it's Rules, put:
Change attribute GoLevel to ----- whatever that particular scene's name is
Save Attribute GoLevel -- with a key of your choice
Now at the start of your game, next to Start Game I guess, make a Continue Button. In it's rules, put:
When GoLevel > ""
Load Attribute GoLevel (with the same key in the behavior)
When GoLevel = Scene1 (or whatever you've called it, etc.,)
Change Scene Scene1
When goLevel = Scene2
Change Scene Scene2
When goLevel = Scene3
Change Scene Scene3
etc; up to the amount of scenes you have. Hope it works out for you.
Edit: Richcoy beat me to it; but mine's a bit more detailed... ;-)
---------------------------------------------
http://www.davidgriffinapps.co.uk/