how to reset score to 0 when you change scenes
TheTiger
Member Posts: 53
Hi everyone, whenever I change scenes, it doesn't reset the score counter, so If i got a score of 1, and I change scenes back to where the game is played it still says the score is 1, so how would I reset the score?
Comments
Create an actor called round rules. I always create this actor in my projects to deal with the main things in my game. In the top of the logic stack, place a change attribute changing game. Score to 0. This will fire when the scene starts and resets the score to 0.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Hi, thanks for that. I think I have got it working Can I just ask, why do you mean by logic stack? Also do I need to put any rule in before I put the change attribute in?
Thankyou for the help.
The logic stack is where your logic is placed in your actors. No. The change attribute needs to be separate and isolated from rules.you want it to fire as the scene starts, which is why you don't want it wrapped in a rule.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Thank you @Braydon_SFX , I had this question also and you answered it perfectly. I'll be creating this "round rules" actor from now on!