| 04-24-2004, 05:21 PM | #1 |
I'm trying to add units to a unit group that are around a point matching several conditions Unit Group - To LightningPicked add units near (Position of (Target unit of ability being cast)) in a range of 500.00 matching (((Matching unit) is alive) Equal to (==) True) Notice the Matching Unit is Alive = True. I would like to use multiple conditions but i'm not seeing a way how right now. I need to only add units that are both ALIVE and an ENEMY of the Triggering Unit. I don't want to use any JASS or Custom Scripts. Can I make a loop somehow that removes any units from the unit group that match my second condition? I tried this but I never got very far. Can anyone help? |
| 04-25-2004, 11:01 PM | #2 |
Well, you can either screen out units matching that condition when you first put them into the loop, or remove them afterwards. Something around Set unitgroupVariable = otherVariable For loop integer A (1 to (number of units in otherVariable) Set currentUnit {unit variable} = random unit from otherVariable If --currentUnit == (condition) Then --remove currentUnit from unitgroupVariable Else --do nothing remove currentUnit from otherVariable It looks a bit odd, but it should work. |
| 04-28-2004, 11:14 AM | #3 |
Use the AND function. You can find it in the conditions section and it allows you to add more conditions to the action. |
| 04-28-2004, 09:48 PM | #4 |
Awesome, exactly what I needed, thanks! |
