• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

Stop firing through walls ?

Not open for further replies.
Level 15
Nov 26, 2005
Ok, so in the picture is my situation.
What I want to ask is:

How to make Marine A UNABLE to attack MArine B from inside the base. I want it to be able to shoot only if it is on the wall (which is fully walkable.)

Any suggestions?


Second question is where in the MPQ of warcraft are the Crates. Barrel and Barrel of Explosives models? Just couldn't find them anywhere...


  • situationAB.JPG
    363.7 KB · Views: 163
Last edited:
Level 4
Apr 15, 2011
you could use sight blockers, as he cant see, he cant shoot. edit: but well you are member since 2005, you probably alredy know that, dont you ? ^^

so anyway, there is a way, I think... but its kinda stupid.

you create a region at that walkable but not shootable point, then if some unit attacks some unit; and if killing unit is in that region you dont want him to attack; and getting-hurt-unit is in that region where you want it to not attacked, you order him to stop.

tl;dr --- create two regions, order attacking one to stop if both units are in regions. multiply regions using region vars with arrays for more points.
Level 15
Nov 26, 2005
Ty for reply.

Actually both your ideas crossed my mind, but I am already using a region visibility modifier, so Idk if the line of sight blocker will work. (The visibility is automatically granted a bit outside the enxlosed base area.

And the region thing is actually what I am trying to do but it has it's flaws ..
Oh well, ty for reply and Uget rep. Any other suggestions are also welcome.

Also I would be glad to receive an answer to my other rather annoyin question. xD Ty.
Level 13
Jun 1, 2008
Easy. Especially when you can walk on the wall..
Just check all points between the marines for the terrain height and order the unit to stop when its too high.
You can also pick destructibles (trees etc) around P3.

z, z0, r: real
x,y: integer
P,P2,P3: points

Event: unit is attacked
P = pos of marine 1
Custom script: set udg_z0 = GetLocationZ(udg_P)
P2 = pos of marine 2 (remove those later, see here for leaks)
r (real) = distance between P and P2
y = integer(r/WallThickness) (number of points to check terrain height)
For each integer x from 1 to y do
P3 = P offset by x * y towards angle from P to P2
Custom script: set udg_z = GetLocationZ(udg_P3)
if z > z0 then order attacking unit to stop & remove points & skip remaining actions

Note: Since the unit will try to attack the other unit all the time this could lead to lags.
So better order the unit to attack another unit or add it to a unit group and dont check for collision every time..
Not open for further replies.