HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Removing Units(1-9)

04-09-2005, 10:37 PM#1
Im_Uber.
I have a Unit Array variable, and i have 9 units set to numbers 1-9. Is there a way to remove all 9 units with 1 action instead of 9 actions?
04-09-2005, 10:54 PM#2
Vexorian
No, but you can use a loop

For each integer A from 1 to 9 do
- Unit - Remove Array[integer A]
04-09-2005, 10:55 PM#3
Zandose
Use a loop


Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units in (Playable map area) owned by (Player((Integer A)))) and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game
04-09-2005, 11:36 PM#4
Raptor--
Quote:
Originally Posted by Zandose
Use a loop


Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units in (Playable map area) owned by (Player((Integer A)))) and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game

uhh sorry, wtf is that? don't you mean

Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        For each (Integer A) from 1 to 9, do (Actions)
            Loop - Actions
                Unit - Remove unitArray[Integer A] from the game
04-10-2005, 01:05 AM#5
Zandose
Yah. I just got to lazy to change it :)
04-10-2005, 01:23 AM#6
Raptor--
Quote:
Originally Posted by Zandose
Yah. I just got to lazy to change it :)

lazy?! common soldier peoples lives... er... maps are depending on us!
:p