| 12-27-2002, 09:25 AM | #1 |
Guest | Here is what Im trying to do. Using (Unit Group - Picking Every Unit......) and setting them as a variable. Then later I want to call up that variable (which is a group of units) and use the Unit Kill trigger. So far I have only managed to kill one unit in the group. I have tried several variables and using arrays but to no success. If anyone can help me that would be great. |
| 12-27-2002, 09:33 AM | #2 |
Guest | Unit Group - Pick all units in [all units in region owned by player[#]] and do: Set variable - [unitgroupvariable](number of [triggeringplayer]) = Picked Unit Then to kill them off do: Unit Group - Pick all units in [unitgroupvariable] = Kill picked unit For those who were wondering how to read my triggers: [] = Changeable codes = My preferred version, tho it will usually work differently also. :) () = Optional for arrays <> = Comment = No comments in this one. |
| 12-27-2002, 09:34 AM | #3 |
Use the action "Unit Group - Pick Every Unit in Group And Do", and then select the group you want to pick from and for the "Do" part, use "Unit - Kill Unit" and for the unit, use "Picked Unit" (Quotes might be slightly off, its from memory) |
| 12-27-2002, 09:35 AM | #4 |
Guest | Hey extrarius, I beat you to it. I AM THE TRIGGER MASTER!!!! HAHAHAHHAAHHAHAH. SOrry. |
| 12-27-2002, 09:42 AM | #5 |
Guest | If I chose Unit Group in the Variable it wont let me chose the equals to Picked Unit. Am I doing it wrong? |
| 12-27-2002, 09:51 AM | #6 |
Guest | I duno. I'll test it tomorrow. its 3 am here now, and my parents are getting pissed. BTW Picked unit is in Premade options If that doesn't work then do Set Variable - [unitgroupvariable] = Unit Group - Pick all units in [units in [region] owned by player[#]] |
| 12-27-2002, 10:11 AM | #7 |
Guest | Well that one worked. Thanks for your help. But I have another problem. The Unit Group - Pick All Units..... im using is picking all units within the range of a Hero unit I created. The problem is that the Hero gets selected too. So when I recall to kill the group, it kills my Hero as well. Sorry for all the trouble, I appreciate all the help you have given me. Thanks |
| 12-27-2002, 10:18 AM | #8 |
Use "Pick All Units Matching Condition and Do", and for the condition test to make sure "matching unit" is NOT the hero you don't want to kill, and then for action kill the unit. That way it will kill every unit except the hero |
| 12-27-2002, 10:49 AM | #9 |
Guest | Thanks for your guys help. I finally got it working. |
