Timer issue, not updating when changed? Please help

wroachbarrettewroachbarrette Member Posts: 101
edited November -1 in Working with GS (Mac)
I have a timer set to keep tempo, and i have a display that shows that the tempo attribute has been changed now in my timer attribute I have it set to be 60/game.tempo ill also mention that tempo is an intergier attribute, but the timer doesnt recognize that the time has been changed when i change the game.tempo attribute why is this?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I think you need to wrap the timer in a rule that acts like a trigger. So create a boolean called game.NewTempo

    Put your timer in a "When game.NewTempo is true" rule. Then in the button that you tap to change the tempo add a rule that says

    when touch is pressed
    change game.NewTempo to 0
    change game.tempo to ___
    change game.NewTempo to 1
  • wroachbarrettewroachbarrette Member Posts: 101
    Im sorry im having trouble understanding what you mean, i warped the timer in a trigger saying that whenever game.newtempo was false it was to play at 60/game.tempo, but it still had no effect on it it just kept playing at the same tempo, so i tried making the tempo attribute a self.tempo attribute but still when i have it set up like this change attribute self.tempo to game.number0+game.number1+game.number2 "an explanation on the attributes i have a system set up so that the 0 controls the 1's place the 1 controls the 10's place and the two controls the 100's place in my tempo for example if 0=0 1=2 and 3=100 the tempo would be 120"
  • Rob2Rob2 Member Posts: 2,402
    You have to restart the timer for it to see the new value. So whatever you are using to adjust the tempo value use that to also pause the timer. It isn't a perfect solution as your 'clicks' will not be continuously variable but will stop while you alter the tempo.
  • wroachbarrettewroachbarrette Member Posts: 101
    welll, i was using a boolean attribute that said when it was false it was to play and true not to but for some reason it never started up again, is there another way i was suppose to start and stop it?
Sign In or Register to comment.