Every 50 points , player health +1

ClownmrminghuiClownmrminghui Member Posts: 18
edited October 2012 in Working with GS (Mac)
Hello GS Community,

I've got a quick question which I will like to seek some help with.

I will like to have my character to regain 1 health everytime the score hits multiple of 50.

How do I do that dynamically?

Thanks in advance :)

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    (Game.score)%50=0
    Game.health=game.health+1
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited October 2012

    Hi @Clownmrminghui

    Make an attribute called ScoreTest
    In the Rules where you add score points, i.e:

    Change Attribute scene.Score to scene.Score+1 -----or similar

    -----add

    Change ScoreTest to Score%50
    Rule When ScoreTest = 0
    Change Attribute scene.Health to scene.Health+1

    Edit: beaten to it by Jon... ;-)
Sign In or Register to comment.