- Joined
- Jun 23, 2007
- Messages
- 4,066
Does that destroy the last created unit group or how does it work exacly?
Take a look at this blizzard function.
JASS:
function ForGroupBJ takes group whichGroup, code callback returns nothing
// If the user wants the group destroyed, remember that fact and clear
// the flag, in case it is used again in the callback.
local boolean wantDestroy = bj_wantDestroyGroup
set bj_wantDestroyGroup = false
call ForGroup(whichGroup, callback)
// If the user wants the group destroyed, do so now.
if (wantDestroy) then
call DestroyGroup(whichGroup)
endif
endfunction
See, if you set
bj_wantDestroyGroup
to true and call ForGroupBJ
then it will destroy the group.I think it would be best to avoid this way of destroying groups, though.