lithin9 / Unturned-Custom-Plugin

Other
0 stars 0 forks source link

Add countdown functionality to ScheduledEvents #189

Closed jcvl92 closed 9 years ago

jcvl92 commented 9 years ago

For this, the scheduled event should take a list of uints that represent the seconds before the event at which a countdown message should be broadcasted. To implement this, run scheduled event timers every second, and keep a counter that will raise the countdown event if the counter is in the list. At counter==0, the event starts. Also, move to setting parameters by name, because by position isn't working out well.

jcvl92 commented 9 years ago

Alternatively, instead of ticking every second, just determine the wait time until the next event by using the interval and uint array of countdown seconds. This would be preferred as it is more performant, and less stupid.