Hello everyone!
I'm here to ask for help about, as the title says, apply timed life command.
I have three custom spells, almost totally operating with triggers, that use dummy units for special effects. Two of them can generate more then 50 dummies during 5 seconds, depending on how many enemies are affected. This, though, wouldn't be a problem (there is absolutely no lag involved) if it wasn't for the fact that these units stay on the map even though i succesfully apply timed life on them. Here is an example:
First of all, loc is a tmp variable used only to be removed afterwards to avoid leaks. The model for this unit is the visual effect of the ability drain life (dark archer) on the target. After 1 second, it succesfully disappears BUT the unit still remains in the map (i've used a trigger to count units in the map). So I tried to make a test by removing locust from the dummy unit; the result was that I was able to select the unit for 1 second, after that amount of time the selection ring disappeared along with the unit(visually speaking), but the unit was still in the map counting with the count function. This basically happens with all of my dummies, so either I'm doing something horribly wrong, or there is something weird going on, may be something that has to deal with death animations or something. Also, I cannot use RemoveUnit because most of these Dummy creation commands are inside loops and I'm not really good with hashtables. Actually, even hashtables are ok if nothing else, just with some help as I'm not used to use them 
Can someone help me? This is a very big problem for my map, as this leak is probably too big and will cause too much lag in the long term!
PS: If you want I can post the entire code of one of the abilities, around 60 lines!
I'm here to ask for help about, as the title says, apply timed life command.
I have three custom spells, almost totally operating with triggers, that use dummy units for special effects. Two of them can generate more then 50 dummies during 5 seconds, depending on how many enemies are affected. This, though, wouldn't be a problem (there is absolutely no lag involved) if it wasn't for the fact that these units stay on the map even though i succesfully apply timed life on them. Here is an example:
JASS:
call CreateNUnitsAtLoc( 1 , 'h001', Player(PLAYER_NEUTRAL_PASSIVE), loc, 0)
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
Can someone help me? This is a very big problem for my map, as this leak is probably too big and will cause too much lag in the long term!
PS: If you want I can post the entire code of one of the abilities, around 60 lines!