1 decade ago by Hareesun
I'm trying to do a few things, none of which seems to be working all too successfully for me. Any help is greatly appreciated.
1) Deduct a few seconds from a timer when a key is pressed.
- So far I have something like this, but it seems to just crash/freeze up
2) Have a timer that counts down.
- I've tried what i've put below, and it almost works except rather than going from -60 to 0 I'd like it to go from +60 to 0.
3) Hours, minutes, seconds.
- If anyone's done this already or got the time/know-how to make a plugin for it, it'd be greatly appreciated.
Thanks again :)
1) Deduct a few seconds from a timer when a key is pressed.
- So far I have something like this, but it seems to just crash/freeze up
init: function () { this.levelTime = new ig.Timer(); }, update: function() { this.levelTimeText = this.levelTime.delta().round(); if (ig.input.pressed('activate')) { this.levelTime--; } }
2) Have a timer that counts down.
- I've tried what i've put below, and it almost works except rather than going from -60 to 0 I'd like it to go from +60 to 0.
this.levelTime = new ig.Timer(60);
3) Hours, minutes, seconds.
- If anyone's done this already or got the time/know-how to make a plugin for it, it'd be greatly appreciated.
Thanks again :)