| 12-27-2003, 08:27 AM | #1 |
I need to make this trigger: When any unit (not bulding) attacks any unit (not building) then it should give gold to attacking unit. The amount of gold should be damage taken. Someone send me these two triggers: Trigger #1 that gives the gold: Events: Conditions: (Unit-type of (Attacking unit)) Equal to Peon Actions: Player - Add (Integer((Damage taken))) to (Owner of (Attacking unit)) Current gold Trigger #2 whenever a unit enters the map: Events: Unit - A unit enters (Entire Map) Condtions: Actions: Trigger - Add to Trigger #1 <gen> the event (Unit - (Triggering unit) Takes damage) But it does not work. Do you know where is error or do you know any other possibilities how to make this trigger? Thanks. |
| 12-27-2003, 08:38 AM | #2 |
I've read a post on this before and from what i read i get the impression that you have to assign the unit to a variable when it enters. So you'll have a massive size 999 array that recycles holding unit variables for you. |
| 12-27-2003, 11:06 AM | #3 |
Why not use the general "unit takes damage" event, and not the specific one? |
| 12-27-2003, 02:16 PM | #4 |
Generic unit events does not include a "unit takes damage" event. Its only available in the specific unit event. |
