Actor moving with integer
efish
Member Posts: 40
I want an actor to move upward a specified step when the gamescore integer gets "+5". What would be the best way to do this? Thank you very much!
Comments
Any time the highscore reaches any number ending with 5 (5,15,25..) something happens to another actor.
I have tried all night long to figure this out, but I just can't get it. Thanks
In your case, you are looking for the remainder to be zero when you divide your high score by 5.
Create an global integer Attribute called "myRemainder" (without quotes).
Any time the high score changes, change this attribute like so:
[high score has just changed]
Change Attribute game.myRemainder To: game.highscore%5
Then add a Rule in the actor that reacts to this change:
Rule
When game.myRemainder = 0
Do something...
Hope this helps!
Joe
@TSB: Yes, sort of close... but as they say, "close" only counts in horseshoes and hand grenades... :0)
Could you just verify where I should put
"Change Attribute game.myRemainder To: game.highscore%5"?
I'm still new to this, but starting to get the hang of it. Thanks again.