• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

One way line of sight

Status
Not open for further replies.
Level 1
Joined
May 18, 2009
Messages
4
OK.. Im trying to create a map with lots of mountains and i need some help with the line of sight.

First, i heard blizz-cliffs aren't very nice so i used height-variation , but the problem comes when someone on higher ground is seen by someone on lower , thing that doesn't happen with the blizz-cliffs.

warcraft3test.jpg


In the photo i used line of sight blockers on the right side, but it blocks both ways of view so its not something really helpful.

So... is there a way to make one way line of sight or something different that acts like the blizz-cliffs?
Thanks:)
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
There is an option.. I don't know what other solution are, this works:

Line of sight can be blocked by: terrain difference, destructibles, units, heroes, buidlings.
How about last 3 when normaly in ladder they do not do such thing?

We can force them to do so by changing value in field Art - Occluder Height. When value is 0, line of sight ins't blocked by given unit at all, but each value greater than 0 reduced line of sight to ANY unit/building/hero around.

Back to your problem ;D
We need to create our own SIGHT blockers. To do this you have to:
Prepare dummy unit - model - none.mdl, give it locust, invurneable ability, disable its attacks, disable posibility to revive it, set fields from movement: Type - to none, Speed to 0, dont forgot about clolision, it needs to be null too.

Ok, now go to field Art - Occluder Height and set it to max value. You own SIGHT blocker is done!
Place it whereever you want. Other units can move thruogh it without any problem.
 
Level 1
Joined
May 18, 2009
Messages
4
Hmm.. I followed your exact instructions but it still doesn't work.
Is there anything more i should know?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Spinnaker's proposal still blocks the sight in both directions, as this is not very different to normal sight blocker destructables. Infact, it is not the z difference that blocks sight but the cliff difference.

Now, I am not sure whether in the map's mesh file the cliff height is directly connected to drawing these things there. If it is, you might rather consider to realize the terrain through a model for example or replace the cliffs' graphics and stuff out the gaps they leave. Or you trigger the vision yourself.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
@WaterKnight The only issue with what I've proposed is that it blocks sight in both ways. So when your unit pass 'unit blocker' it won't see what's behind. Also, it doesn't block the pathing, units can move through it.
However, it should be a problem since via triggers you can manipulate vision.
 
Level 14
Joined
Dec 12, 2009
Messages
1,027
Use blizzard cliffs as a base. Ramp the platform/raised ground on all sides, and then use the raise/lower/plateau/smooth functions to reshape the terrain to something more appealing to the eye. You'll get the blocked site to higher ground but not the other way around and avoid the eyesore of blizzard cliffs.

No triggers or sight blockers are required, you'll just be bypassing the cliff texture and getting the sight modification you want with the art you want.

Check the test map, see if this is what you're getting at. Notice the cliff outline effects, this will work for circular platforms as well.

//\\oo//\\
 

Attachments

  • cliff test.w3x
    14.4 KB · Views: 67
Level 26
Joined
Aug 18, 2009
Messages
4,097
Only that you cannot do ramps on every cliff formation.

Another possibility with one or two catches: Destructables can change the cliff height beneath them as you may know from elevators. In object editor, the field Pathing - Is walkable (bwal) must be set to true and Pathing - Cliff height to the amount you want to add to terrain. Now, to define where this height is applied to, which region belongs to the destructable, its pathing map is used. Unfortunately, this way, you would have to block some pathing (tutorial to pathing maps). The black (none) pathing map does not work since it indicates the gaps. I guess you need walkability and flyability but maybe not buildability depending on your map. The second catch is that you not only have to draw the sight borders but fill the whole cliff with mentioned destructables, and since pathing maps block each other out (at least in editor), other objects would be a hindrance. So if you were to use this method, maybe have a black pathing map to be able to move the destructables in grid and to not interfer with others. Just set the pathing map to the working one when finished.
 
Level 1
Joined
May 18, 2009
Messages
4
Thank u all for the ideas.
Boris_Spiders idea is what i need, though WaterKnighs is good too but it takes too much time:)
 
Status
Not open for further replies.
Top