Gtam
Lerning how to write and read!! Yeah.
- Reaction score
- 164
when i didt create a new trigger for some reason the damage that was added when a unit takes damage was multiplied by how many units was added to the trigger.
why?
Unless the unit dies.but they are used so they must not be destroyed
Are they really this small? I had no idea.Becase Most mappers argue that event leaks are so tiny that unless you're being an idiot it doesn't matter either way, which is generally true: handles by themselves can be pretty small, and you can register tens of events per second and watch the memory usage go up, and then you can press a few arrow keys and watch as the memory usage starts going up several times faster.
Kinda off topic, isn't useful here.I think grim001´s status event stuff is pretty cool. It detects animate death, ressurection and reincarnate at least. ( Although, you can also trigger that stuff, which makes detecting simple )
function DamageCountRemoveUnit takes unit remove returns nothing
if IsUnitInGroup(remove, DCG) == true then
call GroupRemoveUnit(DCG, remove)
endif
endfunction
private function StopTrackUnits takes unit whichunit returns nothing
if IsUnitInGroup(whichunit, DCG) == true then
call GroupRemoveUnit(DCG, whichunit)
endif
endfunction
hook RemoveUnit StopTrackUnits