Trollvottel
never aging title
- Reaction score
- 262
How to attach to timers with a static timers? i guess you mean a struct stack?
I also use a struct stack and not gamecache for timers and PUI for units. BUT
JASS:
Also, take into consideration that most current attachment systems were actually created to replace LHV, because it was slow and unsafe.
Err, its unsafe if you attach HANDLES to someting because you need I2H to Get Them.
And it isnt really slow...
Look if game cache is 4 times slower than arrays and you use it once its like:
local Data d = GHInt(GetExpiredTimer())
that would take about (actually less) as much time as (because struct members are arrays, too):
local Data d = GetCSData(GetExpiredTimer())
local real x
set x = d.a
set x = d.b
set x = d.c
so if you have a complex function etc with more than 100 lines it would not slow down your function at all. And less complex function would not slowed down because of this either.
of course attaching to timers is a bit silly because of several timers running instead of one but if you attach to triggers or dialoques it should not be too bad...
So all in all you can use this system if you want, you wont notice any performance differences if you use it at the right place. Of course there are some slightly faster systems you can use which may have a better interface but if you like LHV, just use it.