Reseting the scene, And score
swiftskater1
Member Posts: 97
I have a button to go to a next scene. The score doesnt reset. Any help?
Comments
In your next level button actor, you'll need a Rule for every scene like this:
Rule
When Touch is pressed
When game.currentLevel = 1
Change Scene to Level 2
Rule
When Touch is pressed
When game.currentLevel = 2
Change Scene to Level 3
etc. etc..
very tedious, but it is the best way right now
But in mine, i cant figure out how to get the attribute to reset when the scene resets, and i cant get text to dissappear when the scene resets.
This the only thing that is stopping me from moving on in my game.
Change Attribute
game.score To: 0
Change Attribute
game.currentLevel To: 1
etc.
In the Actor that needs text to disappear, what text does it say? What is it supposed to say?
I have an actor spawn right at the beginning that does not but change all my presets back to a starting position. For some of them you might need to change at the end of the level before you exit though. For instance, on my TD game, Mission Failure is HP = 0. So 1 second before my scene changes I reset HP to 20, b/c otherwise when the new scene loads the preset does not load fast enough & the game thinks you lost. For all non win/lose attributes I preset them with 1 actor at the beginning of each stage. (Wall of text crits for 5k)
Hope this helps
JGary