• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] How to add unit in an unit group with array?

Status
Not open for further replies.
I want to ask if anybody knows how to add a unit in an unit group with array and with (for each integer A) Like this:
  • Actions
    • For each (Integer A) from 1 to SnowC, do (Actions)
      • Loop - Actions
        • Unit Group - Pick every unit in (Units within (TEstS[(Integer A)] - 150.00) of TestP[(Integer A)]) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked unit) is A structure) Not equal to True
                • ((Picked unit) is alive) Equal to True
                • (Unit-type of (Picked unit)) Not equal to Snow Ball
                • ((Picked unit) is in TestGH[(Integer A)]) Not equal to True
                • (Picked unit) Not equal to TEstU2[(Integer A)]
                • ((Picked unit) belongs to an enemy of (Owner of TestU[(Integer A)])) Equal to True
              • Then - Actions
                • Unit Group - Add (Picked unit) to TestGH[(Integer A)]
              • Else - Actions
But the unit is added for nearly 0.01 second and then it will be removed again from the group.

Any helps will be appreciated.
 
Last edited:
Status
Not open for further replies.
Top