I'll try to formulate it a little bit easier. 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
You'll want to use the modulus operator. It is the percent sign (%). 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)
Thank you very much for both your replies. That sounds good. 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.
Great it worked! The reason why I had some problems was because the myRemainder integer was 0 which triggered the actor right a way. I changed it to 1 and now it seems to be working fine. Thank you very much. Much appreciated.
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.