formula for multiples of 60 in "if" statement in rule?

developer6810developer6810 Member Posts: 139
edited July 2012 in Working with GS (Mac)
I want an autosave feature so basically I added:

timer: every 1 second, change game.SaveTime to game.SaveTime+1

rule: if ANY: game.SaveTime = (I want multiples of 60 to infinity), then SAVE

__________________________

Anyone know what formula I could use to make an infinite number of "if" statements?

Thanks.

Best Answer

  • MarkOnTheIronMarkOnTheIron Posts: 1,447
    Accepted Answer
    So, if I understand correctly you want a Save Attribute to fire every 60 seconds?

    What I would do is to have it on a SceneControl actor. In that actor I would add a self attribute called Mod (or whatever you prefer) and give it a value of 0. Then I would add a rule that says:

    When attribute Mod is equal (=) to self.Time%60
    --Save Attribute

    That way you will fire the Save Attribute every 60 seconds without using any timers because you will use the default Time attribute of the actor.

Answers

Sign In or Register to comment.