Warcraft III resources & community, 2003–2006 · archived

another question

5 posts
#1

another question

let's say i don't want players to be allowed to attack each other (i.e., player A gets pissed off at player B and catches him with low health on his way to heal and kills him). how can i prevent players from attacking each other? is there a trigger that will catch an attack order and cancel it?
#2
Events: Unit: Issued order (target)
Conditions: Health of Targeted unit is less then X%
Issied order equals atack
Actions: Order Triggiring unit to "stop"

it should work :P, i guess
#3
Or you could just change, for each units, the targets allowed, and add enemy. Then you can't ever target allies, except with spells. For the same effect, change the spells' allowed targets.
No triggers needed at all.
#4
changing Targets Allowed to Enemy for combat will have no effect, though, the spells will be fixed by that

for the attacking

Events
A Unit Is Attacked
Conditions
Attacking Unit is an ally of Owner of Triggering Unit Equal to true
Actions
Order Attacking Unit to Stop
#5
that works perfect, thanks fellas.