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.
Need someone that can help with a Wordpress Site that uses Woocommerce and Elementor. Ideally, the designer would be Houston Based that could come and make changes onsite but it is possible for Remote work but they have to be able to keep promises. Onsite Location is 77019 area code close to...