| 08-08-2008, 12:37 AM | #1 |
Trigger: I want the trigger to change to the owner of the attacking player. But for some reason it doesnt work. The trigger does work if i set it to change to a certain player. Dont mind the display text trigger its just to see if the trigger executes or not. |
| 08-08-2008, 12:43 AM | #2 |
The event should be: Trigger: Events![]() Unit - A unit Is attacked |
| 08-08-2008, 01:22 AM | #3 | |
Quote:
I tryed that. But when i attack the circles of power i own they just die and vanish. But with the trigger i have know it works even if you kill your own circles of powers. But then they wont change owner. |
| 08-08-2008, 02:40 AM | #4 |
What is the damage being dealt to the circles? They might just die because...their health is at 100 or less (as in your condition) The circles are the ones being attacked, right? If so i would change you're conditions from triggering unit to attacked unit. That might help, because i think the triggering unit is the attacking unit. |
| 08-08-2008, 02:56 AM | #5 |
you need GetTriggerUnit() For attacked unit And GetEventDamageSource() For attacking unit |
| 08-08-2008, 03:03 AM | #6 |
...doesnt he want it explained in GUI? |
| 08-08-2008, 08:09 AM | #7 | |
Quote:
Triggering Unit for "Attacked Unit" And Event Damage Source for "Attacking Unit" |
| 08-08-2008, 08:28 AM | #8 |
Thanks Eznce and Pyrogasm it worked. |
| 08-08-2008, 08:34 AM | #9 |
Btw attacked unit is simply a slow triggering unit, you should never use it . JASS:function GetAttackedUnitBJ takes nothing returns unit return GetTriggerUnit() endfunction |
