Thread: Timed Effects
View Single Post
Old 01-22-2009, 01:35 AM   #7
Evil Emoticon
moyack's Avatar

Respected User
Project Leader: PoC
Join Date: Jan 2006
Posts: 3,279

Submissions (17)

moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)moyack is a splendid one to behold (666)

AI Tournament #2 - 2nd PlaceHero Contest - Second place

Send a message via MSN to moyack

Originally Posted by Anitarf

I imagine having more timers isn't such a bad thing when it means WC3 doesn't have to execute slow jass code many times per second; it should be the faster solution.

The greater precision of having a timer per each effect is entirely undisputed; whether it matters or not is up to debate, but at worst the precision is irrelevant, and at best it's also in favour of a timer per effect method.
Well, I've tested this code in very hard situations and I haven't had any performance issues. About precision, it's not important in the spell duration but it is it the delay if I follow dusk suggestion. Can you notice if an effect ends in 5.1 seconds or if it ends at 5.151 seconds?? I'm pretty sure you can't, and this is more masked by effects with death animation.

I've added in the first post a library extension which allows the delay option and a version that uses TimerUtils.
moyack is offline   Reply With Quote