• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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

Status
Not open for further replies.
Level 12
Joined
Apr 28, 2012
Messages
166
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