• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] Need Help

Status
Not open for further replies.
Level 4
Joined
Feb 27, 2008
Messages
71
Hey all Can somebody Help me with somethings Please? :grin:
I need help with this : if i have a tower and maybe some Buildings around it so come a enemy and kill the tower and when the tower dies all the buildings around it become the enemys so was killing the tower and create a new tower for the enemy and then again and again and again. Can you show it with triggers Please:wink:
 
Level 4
Joined
Jun 1, 2007
Messages
92
First of all, tell us your problem in a way we can understand.

I assume you mean that when a tower dies, the tower and all nearby buildings are given to the enemy. And repeated numerous times. If so, this trigger may help-

  • Untitled Trigger 003
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Guard Tower
    • Actions
      • Unit - Create 1 Guard Tower for (Owner of (Killing unit)) at (Position of (Killing unit)) facing Default building facing degrees
      • Unit Group - Pick every unit in (Units within 500.00 of (Position of (Dying unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an ally of (Owner of (Dying unit))) Equal to True
            • Then - Actions
              • Unit - Change ownership of (Picked unit) to (Owner of (Killing unit)) and Change color
            • Else - Actions
 
Status
Not open for further replies.
Top