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.
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
Please log in to shout.


Members Online: Roy