Just something I thought of. Let me give you a scenario: you have a bunch I time base things that have to be precise. You use the forever/repeat blocks. It fails miserably. Another thing: you need multiple timed things but you want a 2"1s1s. How are you going to do that? So anyway, this is my idea.
Offline
i think there should be one "master timer" that is the same for every sprite and then a local timer for each sprite
Offline
Maybe a master timer, but make timers available like variables? So any timer can be used on any sprite. This could also help communication between sprites. Maybe also a reset all timers block to.
Offline
benjamin2 wrote:
Why can't you make your own timer?
you might want a 1s1s project
Also if scratch slows down, it might put your timer off-track a bit.
Offline
Support. You should be able to make a new timer just like a broadcast.
I had the idea here, under "sensing"
Offline
True, but there are all kinda of issues like that, it won't be the correct time. It would be slightly off, which could throw the whole project off balance
Offline
workaround:
when gf clicked reset timer delete (all v) of [timers v] when i receive [reset timer v] if <(timer id) > (length of [timers v])> add (timer) to [timers v] //save the starting time else replace item (timer id) of [timers v] with (timer) end when i receive [get timer v] set [result v] to ((timer) - (item (timer id) of [timers v])) //how much time since the last resetThen, to reset a timer, set (timer id) to the number of the timer and broadcast [reset timer]
Last edited by joefarebrother (2012-09-01 05:28:30)
Offline
([timer v] of [Sprite1 v])Would that work for local/global?
Last edited by Molybdenum (2012-09-01 18:46:06)
Offline