| 11-15-2004, 04:13 AM | #1 |
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 |
... Use GUI and convert? |
| 11-15-2004, 07:13 AM | #3 |
just pure jass or convert |
| 11-15-2004, 08:31 PM | #4 | |
Quote:
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=nullOf 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 |
Thanks, I'm suprised the method would be soo simple. |
