HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Jass PICK UNIT IN UNIT GROUP and do actions.

11-15-2004, 04:13 AM#1
tekkvicious
Is there any way to do this without using another function to do the actions.

like.

ForGroupBJ(unitswithrange(100,variabel),condition(matchinngcondtions)
some actions to the picked unit.
endloop
11-15-2004, 06:51 AM#2
Dead-Inside
... Use GUI and convert?
11-15-2004, 07:13 AM#3
tekkvicious
just pure jass or convert
11-15-2004, 08:31 PM#4
Vexorian
Quote:
Originally Posted by tekkvicious
Is there any way to do this without using another function to do the actions.

like.

ForGroupBJ(unitswithrange(100,variabel),condition(matchinngcondtions)
some actions to the picked unit.
endloop
No, there isn't a way without using a new function, boo blizzard.

But fellows figured some ways of simulating a forgroup with a loop

Code:
local group g= CreateGroup()
local unit picked
call GroupAddGroup( (## Insert the group you want to iterate here ##) , g)
loop
      set picked=FirstOfGroup(g)
      exitwhen picked==null
//       ## do the stuff here using picked unit ##
      call GroupRemoveUnit(g,picked)
endloop
call DestroyGroup(g)
set g=null
set picked=null

Of course if you already wanted to destroy the source group you could just iterate it directly then destroy it to save process time
11-15-2004, 08:40 PM#5
tekkvicious
Thanks, I'm suprised the method would be soo simple.