Timer Events

Author Topic: Timer Events  (Read 5085 times)

Set delays on events

Adds the follwing events:

onActivate > Brick > setTimer (33-300000 milliseconds) -- Sets a timer for a brick
onActivate > Brick > cancelTimer -- cancels the timer on the brick
onTimerEnd > Brick/Minigame -- Called whenever a timer ends

Download

Made by this request by GMO Ferret

Edit:

300,000 milliseconds is 5 minutes
« Last Edit: May 11, 2015, 08:51:49 PM by _cake »


nothing to be said but that it looks great

So rather than just doing something like
Code: [Select]
1 [30000] onActivate self setColor [red]
you instead do
Code: [Select]
1 [0] onActivate Self setTimer [30000]
2 [0] onTimerEnd Self setColor [red]


Or am I not understanding? Is there like a visual timer to go with it? Cause the only use I'm seeing out of this is extending the delay of an event by another 30 seconds just by putting a 30k millisecond delay on the onTimerEnd, which could be accomplished with either VCE or with relays.

So rather than just doing something like
Code: [Select]
1 [30000] onActivate self setColor [red]
you instead do
Code: [Select]
1 [0] onActivate Self setTimer [30000]
2 [0] onTimerEnd Self setColor [red]


Or am I not understanding? Is there like a visual timer to go with it? Cause the only use I'm seeing out of this is extending the delay of an event by another 30 seconds just by putting a 30k millisecond delay on the onTimerEnd, which could be accomplished with either VCE or with relays.
this mod allows you to have a 5 minute long delay, instead of just 30 seconds

which, you can do with vce and relays
but this is one event to start and one output
not... 5? 4?
« Last Edit: May 11, 2015, 05:53:41 PM by Lugnut »

the other advantage is you can cancel timers too


Could you maybe expand the timer to have a time limit of like a week or something?  It would be cool for new years' parties and the like.

Could you maybe expand the timer to have a time limit of like a week or something?  It would be cool for new years' parties and the like.
The event would be canceled anyway. When you leave a server, all projectiles that you created are deleted and all events you triggered are canceled.
Also, isn't a week a little excessive? ;-; You'd be much better off just using VCE and chaining it with a time and date check;
Code: [Select]
x 0ms OnRelay Self VCEifVariable [<var:gl:date>] == [Desired trigger day]  [1 1]
x 0ms OnVariableTrue Self VCEifVariable [<var:gl:time>] == [Desired trigger time] [2 2]
x 0ms OnVariableTrue Self DOTHINGHERE
This way you just trigger it near the desired target time and a clock that goes off every second or two will do the rest.


But back on topic, this event is neat; Nice, simple and helps condense events down. The cancel timer event is super convenient too! c:

A week is a little excessive, but what about an hour? If it's possible to get a delay up to one hour, then creating server clocks would become a _cake walk (badumtss)

I'm just curious what the limits are on delays. If 5 minutes is the farthest it can go, it's still a fairly large improvement as Lugnut has pointed out (thank you by the way, I missed a 0 so it seemed like it was still just a 30 second delay.)

Made per request, I don't see any problems here
oh forget my bad, i was responding to adin

this mod allows you to have a 5 minute long delay, instead of just 30 seconds
setTimer (33-300000 milliseconds)

the other advantage is you can cancel timers too
yeah, this is basically all that it has, but that's already doable with the cancel event

this mod allows you to have a 5 minute long delay, instead of just 30 seconds
setTimer (33-300000 milliseconds)
uh... yep? 300,000 milliseconds is five minutes. idk if you skipped a zero when you were reading it or what

oh yeah i did, oops
okay then that's a proper use, but i think i'd prefer a mod to just extend event delay restritictions
guess that wouldn't be possible, though