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

Does neutral hostile have full vision over the map?

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
I wanted to ask how can I apply black mask to neutral hostile, as it seems they have full vision over the map. Example: I've created a neutral hostile unit on the map and set both it's acquisition range and attack range to "20000", then I created a unit of my own, placing each unit on the corner of the map. When the map starts the neutral hostile unit begins attacking my unit even thou the map is black masked. Does neutral hostile have unconditionaly full vision over the map? And how can I apply black mask to them so they don't attack a unit they "can't see" ?
I tried using the function:
  • Visibility - Create an initially Enabled visibility modifier for Neutral Hostile emitting Black mask across (Playable map area)
But it seems it have no effect!
I also set an alliance between Player 1 and Neutral Hostile with shared vision and then all the map got cleared giving me full vision all over the map.
Thanks in advance!
 
Level 11
Joined
Oct 9, 2015
Messages
721
The question here isn't the attack or acquisition range, what matter is that Neutral Hostile can see the entire map and I want it to see the map like all User players do (Black mask, fog of war etc). It's for a stealth system I'm developing where units can only see and detect what is in front of them, I create a black mask effect behind the units. So if neutral hostile can see the entire map this won't work for neutral hostile units. I can attach the map here if you want to take a look for better understanding.
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Neutral hostile is special with acquisition range. If you build something close (like a tower) they will recognize it even if they can't see it and even if they are sleeping. I assume they are made to attack everthing in their acquisition range, as it is kind of their creep camp.
If you want to check if they have full vision, order them to creepthunderbolt (if the creep has hurl boulder) a unit they can't see. With JASS you can directly get a boolean to see if the order was succesful.
In GUI you can print it's current order after 1 second on the screen. If the order was succesful the creep must be able to see the target. If the order was not succesful one reason could be because the creep could not see the target.
If the unit runs towards the target, it must have seen it. If it can't see the target, the creep will just stand still.
 
Level 8
Joined
Jul 10, 2008
Messages
353
Players with ID>11 don't get fog calculations, meaning they are unaffected by anything fog-related. They will see whole map as fog-free, no matter what u do, just because engine works like that.
 
Level 25
Joined
May 11, 2007
Messages
4,651
There are no neutral hostile units on the map you provided.
There is a player 2 without any fixed settings, but that's not really what the thread was about.

Your triggers have a lot of leaks in them, but I'm guessing you'll fix those when you get the system done.
 
Level 11
Joined
Oct 9, 2015
Messages
721
You just need to create a neutral hostile unit or change the ownership of one of the existing units. I provided the map more to clarify what I was doing so you guys could have a better understanding of what I'm trying to achieve...
 
Level 25
Joined
May 11, 2007
Messages
4,651
I tried it on a normal map by changing the units to neutral extra and setting them to be enemies with the player.
Didn't work either.

So I would probably use a player with fixed settings rather than the neutral hostile player.
 
Status
Not open for further replies.
Top