• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[General] Detect units if they're seen by players

Status
Not open for further replies.
Level 20
Joined
Aug 13, 2013
Messages
1,696
How to detect if the unit is in visibility fog of war or black mask.

Because I'm making AI Casting a carrion swarm in 3000 range and the carrion swarm ability has a cast range of 3000.
The problem is he can cast the carrion swarm to the enemy units in 3000 range even there's no a vision to the picked unit.
 
Level 5
Joined
May 6, 2013
Messages
125
JASS:
constant native IsVisibleToPlayer           takes real x, real y, player whichPlayer returns boolean
constant native IsFoggedToPlayer            takes real x, real y, player whichPlayer returns boolean
constant native IsMaskedToPlayer            takes real x, real y, player whichPlayer returns boolean

Try to check if the location the unit is standing on is visible
 
Status
Not open for further replies.
Top