Carl-Fredrik
New Member
- Reaction score
- 51
Hi everyone!!
So.. what I've learned is that if you don't want a unit group to leak, do like this:
But then I see people do like this... and I guess the script somehow also prevents leaking?
So which of these two ways are the best? Maybe the first one is better if you want to use the Unit Group many times... but both prevents leaks, right? Or am I totally wrong?
Well, the simple question is, what does this script do?
Thanks in advance!
// Carl-Fredrik
So.. what I've learned is that if you don't want a unit group to leak, do like this:
Trigger:
- Actions
- Set UnitGroup = (Units in (Playable map area))
- Unit Group - Pick every unit in UnitGroup and do (Actions)
- Loop - Actions
- Unit - Change color of (Picked unit) to Red
- Loop - Actions
- Custom script: call DestroyGroup (udg_UnitGroup)
But then I see people do like this... and I guess the script somehow also prevents leaking?
Trigger:
- Actions
- Custom script: set bj_wantDestroyGroup = true
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
- Loop - Actions
- Unit - Change color of (Picked unit) to Red
- Loop - Actions
So which of these two ways are the best? Maybe the first one is better if you want to use the Unit Group many times... but both prevents leaks, right? Or am I totally wrong?
Well, the simple question is, what does this script do?
JASS:
set bj_wantDestroyGroup = true
Thanks in advance!
// Carl-Fredrik