• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
Level 21
Joined
Aug 13, 2013
Messages
1,709
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.
 
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.
Back
Top