I just have a quick question. Unit groups leak if not destroyed right? so if for example i make a trigger that calls the units in the group say every .00000001 of a second im about to experience an unhappy computer?
is that decimal even possible in warcraft?
I think 0.01 is the minimum
You can go lower than 0.01, you just have to use arithmetic function in GUI:
Untitled Trigger 108
Events
Time - Every (0.01 / 2.00) seconds of game time
Conditions
Actions
Set Temp_Real_4 = (Temp_Real_4 + 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Real_4 Equal to 1000.00
Then - Actions
Game - Display to (All players) the text: (String(Temp_Real_4))
Trigger - Turn off (This trigger)
Else - Actions
Temp_Real_4 will diplay the text a lot sooner.
Untitled Trigger 108 Copy
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set Temp_Real_3 = (Temp_Real_3 + 1.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp_Real_3 Equal to 1000.00
Then - Actions
Game - Display to (All players) the text: (String(Temp_Real_3))
Trigger - Turn off (This trigger)
Else - Actions
How is it nobody ment call DestroyGroup (udg_Unit_Group) yet?
set bj_wantDestroyGroup = true
ForGroupBJ
call DestroyGroup
How is it nobody ment call DestroyGroup (udg_Unit_Group) yet?
WC3 uses 32 bit floats I believe which means they have limited accuracy. 0 is a perfectly valid time. However it still has a delay as I believe it runs the timer next internal update cycle.
Unit groups do not leak by them selves, they only leak if you make new ones and then lose the pointers to them before destroying them (something WC3.'s garbage collector could easilly catch but does not). Generally I advise making a constant group and then just using the enums on it as they only alter the contense of the group and do not make new groups. This is the most efficent way as you only have like 1 group used by many systems which is never destroyed and always reused meaning no wasted time in object allocation / deallocation.