How to destroy unit group with index (GUI)

Status
Not open for further replies.
Level 11
Joined
Oct 20, 2007
Messages
342
to anti memory leak, i destroy the unit group variable by
Custom script: call DestroyGroup (udg_Temp_UnitGroup1)

But how if there got index like
  • Unit Group - Add (Triggering unit) to DU_SelectedGroup[(Player number of (Triggering player))]
  • Unit Group - Pick every unit in DU_SelectedGroup[(Player number of (Triggering player))] and do (Actions)
    • Loop - Actions
      • Set DU_SelectedUnit[(Player number of (Triggering player))] = (Picked unit)
I have try this trigger but can't work?
  • Unit Group - Remove all units from DU_SelectedGroup[(Player number of (Triggering player))]
  • Custom script: call DestroyGroup (udg_DU_SelectedUnit[GetConvertedPlayerId(GetTriggerPlayer())])
 
Level 11
Joined
Oct 20, 2007
Messages
342
Finally i found it :xxd::xxd::xxd::xxd:
A stupid miss take :xxd::xxd::xxd:

Wrong:
Custom script: call DestroyGroup (udg_DU_SelectedUnit[GetConvertedPlayerId(GetTriggerPlayer())])

Correct:
Custom script: call DestroyGroup (udg_DU_SelectedGroup[GetConvertedPlayerId(GetTriggerPlayer())])

Thx a lot
:xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd:
 
Status
Not open for further replies.
Top