How can I stop the score from adding?

I have a score that increase by +1 but I want it to stop when the actor touches the ground what rules do I need to make this happen? instead atm it just carries on adding.

Kind Regards

Comments

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    Create an attribute called "Grounded"

    When actor collides with ground, change attribute "Grounded" to true
    Otherwise: Change attribute "Grounded" to false.

    When attribute "Grounded" is false, change score to score+1
  • CoolBeeCoolBee Member Posts: 81
    Thanks @bjandthekatz that works but I also have the rule When game.score > game.highscore then constrain game.score to game.highscore, yet even when I reset the scene or go back to the title screen and start over the score STILL adds to the highscore even tho its higher than the starting score of 0 any ideas at what I've missed?
  • WingmanappsWingmanapps Member Posts: 458
    dont contrain highscore - just change highscore
  • CoolBeeCoolBee Member Posts: 81
    That did the trick thanks @Wingmanapps.
Sign In or Register to comment.