• 🏆 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!

Unit only visible in fog of war

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

Is there a way to make a building only "visible" in the fog of war? That is when players are actually in vision, they see nothing. But when they move out of vision, the building's model will appear in the fog of war (imagine a mirage or something like that). Preferably would like this possible without triggers...
 
Level 25
Joined
May 11, 2007
Messages
4,651
Yes triggers will be needed.

[Event]Every X amounts of seconds.

[Actions]Check distance between your units and the building.
If distance <= unit visibility range:
set hideBuilding = true;

if hideBuilding
hide Building
else
unhide Building
 
Level 25
Joined
May 11, 2007
Messages
4,651
But he didn't want them to become transparent, he wanted to hide them..
And it's for a building or unit in the fog of war, and buildings and units in the fog of war are unselectable by default, so there is no need to add locust to them.
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
But he didn't want them to become transparent, he wanted to hide them..

Precisely. That's why I responded to his query

What if a building is invisible? Won't it still show up on the fog of war?

And it's for a building or unit in the fog of war, and buildings and units in the fog of war are unselectable by default, so there is no need to add locust to them.

It was a warning regarding ShowUnit() in general.
 
Status
Not open for further replies.
Top