how to reset score to 0 when you change scenes

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

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    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.

  • TheTigerTheTiger Member Posts: 53

    @Braydon_SFX said:
    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.

    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.

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    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.

  • Chr0nosChr0nos Wondering Vagabond AustraliaMember Posts: 113

    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!

Sign In or Register to comment.