• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

how make unit can't atk over tree wall

Status
Not open for further replies.
Level 11
Joined
Oct 20, 2007
Messages
342
how make unit can't atk over tree wall.

i have a line of tree to block out movement and sign range of unit,
when i see unit over there, my range unit attack over the tree wall,

how i make them can't attack if blocked by tree wall
(the tree wall created randomly in game)
 
I don't think you can unless you replace all projectiles by dummy units with that model and order them to die when in range of a tree. But with a large amount of units, that'll cause a lot of lag. This method should probably only be used in RPGs. If you're making a different kind of map, you probably can't do this.
 
i have think be4, but as 1st post say, (the tree wall created randomly in game)(make by player)
so the direction is different in every game, too hard or imposible to create every region on the side and which way to which way, got block or not and many many....
 
i have think be4, but as 1st post say, (the tree wall created randomly in game)(make by player)
so the direction is different in every game, too hard or imposible to create every region on the side and which way to which way, got block or not and many many....

It can be done checking, when unit attacks, if there is any tree in the path between attacker and attacked unit.
 
Actually, you can't. For as far as I know, you can only check for doodads in a region. And since you can't create regions, only move them, you can't shape them in the range and angle you need. And regions can only be created horizontally and vertically. So if the angle isn't 0, 90, 180 or 270, there's absolutely nothing you can do.
 
and another problem if u use trigger to check it:
if you use trigger to check the region, let say if there have blocked tree,
you order it to stop???
then it auto attack again, then trigger stop again?

so the unit like jam at there??
 
Status
Not open for further replies.
Back
Top