• 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.

[Solved] Hide Region in FOW unless you are standing in it.

Status
Not open for further replies.
Level 1
Joined
May 18, 2014
Messages
2
I would like to hide a region in the fog of war unless you are standing in that region. Even if you are standing right next to the region, you should not be able to see in that area.

Can this be done? I have been playing around with it all day and cannot seem to find a solution.

Essentially, I suppose you could say that I need the region to behave the same way that a cliff does, but I cannot just use a cliff. It has to be on or near the same elevation.

Thanks!
Kanoobee
 
Level 1
Joined
May 18, 2014
Messages
2
Possible solution...

Yeah, unfortunately it does look like I will have to use LOS blockers.

I think I may have found a solution. I just need help getting it into a trigger.

There is a Unit_FlagArray that you can set it the Data editor called "Use Line of Sight" or "e_unitFlagUseLineOfSight". When checked, your vision is blocked by LOS blockers, when unchecked, you have unobscured vision(aka, 'Flying Vision').

The other option would be to set a unit's vision height via triggers. (This might be preferred since there can be multiple levels of cliffs.

Either way, I will have to use LOS blockers to get this done. There doesn't seem to be a trigger function that is able to 'hide' a region regardless of if you are near it. It seems to only have the ability to reveal regions.

Now to the part that I do not know and still need help with.
What "Actions" within a trigger do you use to set the unit vision height or to disable the 'Use Line Of Sight' flag?

Thanks,
Kanoobee
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
There is a Unit_FlagArray that you can set it the Data editor called "Use Line of Sight" or "e_unitFlagUseLineOfSight". When checked, your vision is blocked by LOS blockers, when unchecked, you have unobscured vision(aka, 'Flying Vision').
No, when unchecked it just uses generic vision based on the vision radius. When checked it uses occlusion height to calculate vision blocking as well as sight blockers. This means that a flying unit will not be able to see over a tall cliff until he flys up over it and a low unit (zergling) cannot see behind trees yet a tall unit (colossus) can. It also limits the maximum sight range and even reports an error if sight range is set beyond the limit.

Either way, I will have to use LOS blockers to get this done. There doesn't seem to be a trigger function that is able to 'hide' a region regardless of if you are near it. It seems to only have the ability to reveal regions.
You can reveal, unexplored and explore regions.

It appears not possible to change unit vision type with triggers. You cannot change unit vision radius directly with triggers. You can change unit vision radius indirectly with triggers by adding/removing behaviours that modify unit vision radius.
 
Status
Not open for further replies.
Top