PurgeandFire
zxcvmkgdfg
- Reaction score
- 509
An improved version of TriggerRegisterAnyUnitEventBJ().
I didn't do much to change other than to fix the leak each time running. Thanks to builder Bob for pointing out the flaw in my last one.
NOTE: If you have a global "True" dummy function, it might be better to use that instead of the TRAUE one. And you should simply inline this code, it isn't too much to.
Btw, TRAUE stands for TriggerRegisterAnyUnitEvent.
Enjoy. No credits needed... It is exactly same as TriggerRegisterAnyUnitEventBJ() but just a dummy filter.
I didn't do much to change other than to fix the leak each time running. Thanks to builder Bob for pointing out the flaw in my last one.
JASS:
library TRAUE
private function True takes nothing returns boolean
return true
endfunction
function TriggerRegisterAnyUnitEvent takes trigger t, playerunitevent pue returns nothing
local integer i = 0
loop
exitwhen i==16
call TriggerRegisterPlayerUnitEvent(t,Player(i),pue,Condition(function True))
set i = i + 1
endloop
endfunction
endlibrary
NOTE: If you have a global "True" dummy function, it might be better to use that instead of the TRAUE one. And you should simply inline this code, it isn't too much to.
Btw, TRAUE stands for TriggerRegisterAnyUnitEvent.
Enjoy. No credits needed... It is exactly same as TriggerRegisterAnyUnitEventBJ() but just a dummy filter.