HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

"set bj_wantDestroyGroup = true" Before Condition Work Fine?

07-19-2009, 06:36 PM#1
Brash
Trigger:
Tear SE Check
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Custom script: set bj_wantDestroyGroup = true
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in (Units in (Playable map area) matching (((Matching unit) has buff BUFFNAME) Equal to True))) Equal to 0
Collapse Then - Actions
Game - Display to (All players) for 5.00 seconds the text: test
Collapse Else - Actions
Do nothing

Since i'm using a generic unit group check through a condition without setting it to a unit group, should placing that custom script before it work just as well so i dont have to set it?
07-19-2009, 06:54 PM#2
Troll-Brain
Yes it should work fine.
However if you use "Unit Of Type" you must not use "set bj_wantDestroyGroup = true" just before the group enum, because the group won't be destroyed, and the temp group used by the gui function will enum only red player's units, and then will be destroyed.
Yes Blizzard had failed, they should use an other GroupAddGroup function in this case.

So in this case use a variable and a custom script "call DestroyGroup(...)"