Staredit Network > Forums > SC2 Assistance > Topic: Unit Group - Foreach and add to group
Unit Group - Foreach and add to group
May 16 2010, 5:34 pm
By: Devourer  

May 16 2010, 5:34 pm Devourer Post #1

Hello

So, problem #1:
I got a unit-group which contains all units of player 1, and in a trigger I want to put all Type-X-Units (spawning pools) into an other group (they have to be in the other unit group as well, so not "moving them from group 1 to 2)).

And #2:
"Foreach unit in unit group" got a parameter (Units-unit) which I do not really understand how to use. What does that parameter stand for? You can only put a single unit in it.



Please report errors in the Staredit.Network forum.

May 16 2010, 6:55 pm Demented Shaman Post #2



1. Start with a Pick each Unit In Unit Group for the unit group for the player 1 units group you have. Inside that add a condition that checks the picked unit to see if the picked unit is a spawning pool. If it is a spawning pool then just do the Unit Add to Unit Group with the picked unit.

2. I think it's a loop that goes through each unit in the unit group, with each iteration assigning a unit in the unit group to the Unit parameter you specify.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-6-04. : 3:42 am]
RIVE -- Hellooooo, Nurse
[2026-6-03. : 4:19 pm]
NudeRaider -- Hello World!
[2026-6-01. : 4:03 pm]
IskatuMesk -- no Hello World? No Hello . jpeg? Not even ddosing some government website? smh my head
[2026-5-31. : 10:02 pm]
Symmetry -- I was really just figuring out how to compile
[2026-5-31. : 10:02 pm]
Symmetry -- I didn't make it do anything
[2026-5-31. : 9:17 pm]
Ultraviolet -- hell yeah. did you have trouble making the button functional, or just haven't gotten there yet?
[2026-5-31. : 8:29 pm]
Symmetry -- I made the marine shoot lasers and gave the medic a nonfunctional button
[2026-5-31. : 8:07 pm]
Ultraviolet -- Symmetry
Symmetry shouted: I did my first EUD thing today. Feels like me finding arsenal at age 8 again
haha for sure. in some ways it's even more exciting because you can play EUD maps on regular battle.net, don't need to convince someone to download your mod to play with you. what did you do?
[2026-5-31. : 6:47 pm]
Symmetry -- I did my first EUD thing today. Feels like me finding arsenal at age 8 again
[2026-5-31. : 3:20 pm]
l)ark_ssj9kevin -- le reddit
Please log in to shout.


Members Online: Moose