Jesus4Lyf
Good Idea™
- Reaction score
- 397
Smooth Timers
Version 1.1.0
See attached SC2Lib file.
Slightly similar to the Warcraft III Timer32 system, but nowhere near as cool. But GUI!
Example:
Trigger:
- SmoothTimersExampleInit
- Events
- Timer - Elapsed time is 1.0 Game Time seconds
- Local Variables
- SmoothTimer = 0 <Integer>
- Conditions
- Actions
- Variable - Set SmoothTimer = (NewSmoothTimer(SmoothTimersExample, 5))
- General - Wait 2.0 Game Time seconds
- DestroySmoothTimer(SmoothTimer)
- Events
Trigger:
- SmoothTimersExample
- Events
- Local Variables
- Conditions
- Actions
- UI - Display (Text((GetSmoothTimerData((GetExpiringSmoothTimer()))))) for (All players) to Debug area
The example will just display "5" a whole lot. The premise is, that using the data integer as an index, you can attach whatever you wish to timers, which will fire 32 times per second. This is to overcome SC2 limitations on timers only being able to fire as fast as 16 times per second, as well as overcoming their lack of data attachment. :thup:
The original SC2 timer system.