Grant visibility on the entire map for both units (fog of war is not an option)
Increase the Marine's attack range slightly
Place a huge wall between them
As you can see from the screenshot, the bullets in the Marine's C-14 Gauss Rifle pierce right through tons of solid rock and hit the opponent Marine on the other side. How do I prevent them from firing at each other when there is a wall between them?
What have I tried is:
Line of Sight blockers (don't work because of the map-wide visibility)
Placing a region on the "wall" and removing visibility/unexplore within this region
Using Validators on the Marine's weapons (no luck)
The issue here is the constant visiblity. Everything that blocks line of fire normally, is simply blocking vision. Unless you made some manual colliding projectile or somesuch, which wouldn't be a straightforward task or be very practical.
I thought there was a "require line of sight" flag on weapons or units, you might need to find this and try it.
I placed a turret behind a wall and at certain points it would stop firing at my unit on the other side of the wall, so there might actually be some true line of sight.
I was also looking to do this. Seems like it's in demand lol. There's gotta be a way to make it so that units can only target units on cliff levels equal or less than their current cliff level...
I need this as well, spent most of today trying to figure it out, best I could come up with, was a trigger whenever a unit "Aquires Target" with a condition pathing to both units is "false" to apply either Cloak or Ghost-Hold Fire behaviors for 2-5 seconds. It sorta works, at least when dealing with a pair of units, add in a third or more others involved and it just falls apart.
I know there is a validator for cliff heights, but I can't find any way to block units attacking thru walls/units/structures/doodads and that is really what I needed here.
If anyone has success or a better work around please share!
Somehow change the weapon's option to melee fixed it. Unit can still fire in range however cannot on different cliff level. I will provide a better solution if I find out. Shooting through wall should definitely be blizzard's bug though in some places of the campaign we cant because of not having vision
Edit: How it work is that weapon can only fire if unit is reachable by melee range, your demonstrated marine will go around the cliff to fire. Same applied with any doodads that prevent ground pathing
Edit 2: And the bullet is actually not pierce through tons of solid rocks. It fly upward above it. Try that with marrauder. Still you can change it mover to make it pierce through rock
Edit 3: A fix if you still want to fire on different cliff level, duplicate the weapon and use cliff validator for it (validate for different cliff only since the melee weapon already handle equal cliff level). Your unit will have 2 weapons, 1 for firing on equal ground, one for the other. check hidden flag for 1 of them if you want
To look at this issue again, I think I have a real solution for this but need help with how to set the validator.
Consider a marine on both sides of a cliff as in the picture.
Before the marine can fire,the mathematical question (argument) that needs to be asked is this:
Is the PATHABLE distance between the 2 units LESS THAN OR EQUAL to the POINT TO POINT distance between them.
Imagine 2 marines with nothing between them. In this case the PATHABLE distance will be EQUAL to the POINT TO POINT distance.
Now anytime anything, doodads, units, or structures (anything with a footprint) moves into the line of site (POINT TO POINT) distance between the 2 marines,the PATHABLE distance will become LARGER and the POINT TO POINT DISTANCE will remain the same.
There is a Function in the trigger editor called PATHING COST BETWEEN POINTS that will return the PATHABLE Distance between 2 points, and you can use the Distance between 2 points to get the Line of Site distance.
The game already has a variety of algorithms for checking line-of-sight and pathing, and these work beautifully. Why they don't apply to weaponry I do not understand.
I've tried using Validators, checking for obstacles between the two points. But it seems the Marines will still spot each other and just stare at one another. Essentially, this behavior should not only apply to a unit's weapon, but to its field-of-sight all together.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
'ello fellow mappers
I've stumbled into a problem that I simply cannot figure out myself: Units can shoot directly through walls (terrain cliff level differences).
I have illustrated the issue in this screenshot: http:dl.dropbox.com/u/249997/Screenshot2010-08-24%2001_55_45.jpg
What I have done in the above example is:
As you can see from the screenshot, the bullets in the Marine's C-14 Gauss Rifle pierce right through tons of solid rock and hit the opponent Marine on the other side. How do I prevent them from firing at each other when there is a wall between them?
What have I tried is:
Any people with bright ideas?
Thanks in advance
The issue here is the constant visiblity. Everything that blocks line of fire normally, is simply blocking vision. Unless you made some manual colliding projectile or somesuch, which wouldn't be a straightforward task or be very practical.
I thought there was a "require line of sight" flag on weapons or units, you might need to find this and try it.
I placed a turret behind a wall and at certain points it would stop firing at my unit on the other side of the wall, so there might actually be some true line of sight.
Oh goodness, Thats the best map I have ever seeen1!!!
Ops sorry /focus
I would also like to know how to do this, As I have little lyote critters with laser beams shoot through 35% of the earths mass at times.
@KratsAU: Go
Hmm, I thought that that just meant that it needs to have a visible target or something... maybe it's related in some other way.
I was also looking to do this. Seems like it's in demand lol. There's gotta be a way to make it so that units can only target units on cliff levels equal or less than their current cliff level...
@Atl0s: Go
Preventing a unit from firing at a unit on a different cliff level can be done with Validators. Just FYI :)
Perhaps make all attacks missiles that hit walls when they get near them?
I also have this problem.
I need this as well, spent most of today trying to figure it out, best I could come up with, was a trigger whenever a unit "Aquires Target" with a condition pathing to both units is "false" to apply either Cloak or Ghost-Hold Fire behaviors for 2-5 seconds. It sorta works, at least when dealing with a pair of units, add in a third or more others involved and it just falls apart.
I know there is a validator for cliff heights, but I can't find any way to block units attacking thru walls/units/structures/doodads and that is really what I needed here.
If anyone has success or a better work around please share!
Somehow change the weapon's option to melee fixed it. Unit can still fire in range however cannot on different cliff level. I will provide a better solution if I find out. Shooting through wall should definitely be blizzard's bug though in some places of the campaign we cant because of not having vision
Edit: How it work is that weapon can only fire if unit is reachable by melee range, your demonstrated marine will go around the cliff to fire. Same applied with any doodads that prevent ground pathing
Edit 2: And the bullet is actually not pierce through tons of solid rocks. It fly upward above it. Try that with marrauder. Still you can change it mover to make it pierce through rock
Edit 3: A fix if you still want to fire on different cliff level, duplicate the weapon and use cliff validator for it (validate for different cliff only since the melee weapon already handle equal cliff level). Your unit will have 2 weapons, 1 for firing on equal ground, one for the other. check hidden flag for 1 of them if you want
@progammer: Go
lol man! I can't believe this works! Such a simple check and it solves it perfectly. Thank you!
@progammer: Go
Thanks. I will check this out.
And regarding the bullet's trajectory, I'm fully aware how it works. Was just a bad joke ;)
To look at this issue again, I think I have a real solution for this but need help with how to set the validator.
Consider a marine on both sides of a cliff as in the picture.
Before the marine can fire,the mathematical question (argument) that needs to be asked is this:
Is the PATHABLE distance between the 2 units LESS THAN OR EQUAL to the POINT TO POINT distance between them.
Imagine 2 marines with nothing between them. In this case the PATHABLE distance will be EQUAL to the POINT TO POINT distance.
Now anytime anything, doodads, units, or structures (anything with a footprint) moves into the line of site (POINT TO POINT) distance between the 2 marines,the PATHABLE distance will become LARGER and the POINT TO POINT DISTANCE will remain the same.
There is a Function in the trigger editor called PATHING COST BETWEEN POINTS that will return the PATHABLE Distance between 2 points, and you can use the Distance between 2 points to get the Line of Site distance.
Hope this makes sense.
@BudSMoken: Go
(Necro!)
The game already has a variety of algorithms for checking line-of-sight and pathing, and these work beautifully. Why they don't apply to weaponry I do not understand.
I've tried using Validators, checking for obstacles between the two points. But it seems the Marines will still spot each other and just stare at one another. Essentially, this behavior should not only apply to a unit's weapon, but to its field-of-sight all together.