Accelerating timer sound.
Hey guys!
I have set a global value as a timer. It is set to 2400. I substract 1 value per frame from it, so with 60fps it equals to 40 sec.
I created a 40 seconds clip that has this "tick" sound, and it gets faster and faster towards the end. Zelda style! :)
Anyway, if I change frame while the timer runs, it seems to desync - so this is not a very good approach.
So instead I created only one short tick sound, and I'm looking a way to accelerate it's play speed over the time.
This is probably quite simple. But any suggestions what would be the best approach?
Thanks!
EDIT: I was thinking something like looping a value between 1-10, and everytime it hits 10 it plays the tick sound and goes back to 0. Also using another increasing value which multiplies the base value of timer.
Gotta try it, but meanwhile better suggestions are welcome. :)
EDIT2: Ah sorry, it worked like a charm that way. NVM! :)
- Jesse