• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Prevent Team Killing

Status
Not open for further replies.
Level 4
Joined
Apr 25, 2008
Messages
60
Can anyone write me a trigger which prevents allied units to attack each other?

I can't do this by object editor. So I need to do it with triggers. I had some ideas, but none of them worked.
 
Level 5
Joined
Dec 18, 2007
Messages
205
maybe just
"A unit is being attacked"
"attacking unit belongs to an ally of triggering unit"
"order attacking unit to stop"?
just a fast asnwer, dont know whether it works
 
Level 11
Joined
Feb 14, 2009
Messages
884
It does. That's the way to do it. You see, this trigger is activated before the unit attacks, when it is about to attack.
 
Level 5
Joined
Dec 18, 2007
Messages
205
then add the condition
Unit type of triggering unit NOT EQUAL to Footman
(or whatever unit-type should be able to BE attacked)
 
Status
Not open for further replies.
Top