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

[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