| 05-31-2004, 06:55 PM | #1 |
I'm trying to make a trigger that does this: Picks every unit owned by Player 1 Set's HP to Max HP (healing) (I can't do this part below) Set variable = (Variable) - 4000 What it does is, subtracts 4000 for each unit healed. I only want it to take 4000! |
| 05-31-2004, 07:03 PM | #2 |
Code:
Events:
Your event
Conditions:
Your conditions
Actions:
Unit Group - Pick every unit in (Playable map area) owned by (Player 1 (Red))
Loop Actions:
Unit - Set life of (Picked unit) equal to (Max life of (Picked unit))
Set Variable = (Variable - 4000)If you pay attention to the spaces in front of the actions, you see that the variable set part is not part of the Pick every unit, but actually was nothing to do with it. Fully collapse the Unit Group (by pressing the - sign) and then right-click on it. Select "New action" and put in your action. By doing this, the variable setting action will appear below the collapsed Unit Group. This means that it is out side of the unit group. Everything inside the unit group action will be repeated once for every unit. |
