How about a timer that starts at initialization and never stops, when a timer it's created check the main timer's elapsed time and when does the new timer expire considering the main timer (like a time stamp), then sort them through a binary heap?
Finally found the bug, It seems that units in my TD are DEINDEXED the second they enter the map, why? because they're instantly ordered to move to a location and they don't have the index ability yet, causing them to be deindexed. Another bug i found is because WorldBounds is bugged, looks like if the unit touches the border of the map it's deidexed and it shouldn't. Please fix thse weird bugs
i JUST copied them from the webpage. Also checked the code and nothing seemed to be wrong with it. However there seems to be an issue regarding the "e" unit array in the unit indexer because some of my tests indicate that targetId returns an integer, but when i try to get an unit from that value it returns null.
With [ljass]GetUnitById(DamageEvent.target)[/ljass] i hope you mean [ljass]GetUnitById(DamageEvent.targetId)[/ljass] which is basically what the operator returns. And yes, in my triggers DamageEvent.source returns an unit, but DamageEvent.target is null.
I'll PM you my code
In the version of unit indexer GetUnitId was commented, just downloaded it again from the webpage. Still using GetUnitUserData should be better
EDIT: the weird thing is that targetId does return an integer, but GetUnitById(targetId) returns null
So i decided to delete AIDS, Damage and Event (J4L libraries) from my map and replace them with yours.
You should probaly fix the API in your Damage library from EVENT to ANY (in the post you submitted not the trigger)
You should also mention that you commented the GetUnitId function from you UnitIndexer because users are meant to call GetUnitUserData directly
EDIT: your damage library seems to not be returning the DamageEvent.target unit when the trigger fires. Why?
Ok got it working now, i think that the LUA_FILE_HEADER from the quickstart tutorial is outdated.
On a side note, i can't use your libraries now because you stole other library's names. For instance, you have your own "event" library different from J4L's, but if i replace his with yours then i can't use J4L's Damage system.
I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page