Block Units From Attacking (was: Warcraft III TFT World Editor)

1Toad1995

New Member
Reaction score
1
I'm making a dungeon map and in the different cells there are ranged units that attack when you are in other cells. How do I make it so they won't attack from a certain distance/other cells. I've changed view made and them camp units and can't find solution.

Edit: Thanks.
 

Nherwyziant

Be better than you were yesterday :D
Reaction score
96
Trigger:
  • AttackStop
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Owner of (Attacked unit)) is an enemy of (Owner of (Attacking unit))) Equal to True //Replace or add more conditions if needed
    • Actions
      • Set Point_X[1] = (Position of (Attacking unit))
      • Set Point_X[2] = (Position of (Attacked unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Point_X[1] and Point_X[2]) Greater than or equal to 500.00 //Set 500.00 to the value of distance you wan't to stop the attacker
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Point_X[1])
      • Custom script: call RemoveLocation(udg_Point_X[2])
 

1Toad1995

New Member
Reaction score
1
OK, I'm sorry again but I've been trying to find Distence beetween points for 30 minutes can someone help? I have the rest done.
 

kaboo

New Member
Reaction score
45
object editor - select your archers - decrease their aquistion (spelling?) range

also, use edit button next time
 

dudeim

New Member
Reaction score
22
You could also order a dummy unit to cast a Silence spell wich has an unlimited duration and disables ranged/melee attacks or whatever you want. And when they have to get out again and need to reattack you can remove the buff and they should be able to attack again.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top