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

[JASS] Water Detection

Status
Not open for further replies.
Level 3
Joined
Oct 20, 2006
Messages
27
Can't seem to detect water. It just says it's not water. This:

JASS:
    function IsPointWater takes real x, real y returns boolean

        return IsTerrainPathable(x,y,PATHING_TYPE_WALKABILITY) and not (IsTerrainPathable(x,y,PATHING_TYPE_AMPHIBIOUSPATHING))

    endfunction

Doesn't work. I try setting a boolean to the value returned by that function and check whether it is true to see if the point was water. Always says it is ground, even if the point was really on water. It is a function included in Vex's Caster System

What I did was ticked off the 'Enforce Water Height Limits', made the places I wanted water to be water, then made them plain again, then used lower to "carve" the river.

Is there another way to detect water?
 
Level 3
Joined
Oct 20, 2006
Messages
27
Oh so did the function get it oppositely wrong?

EDIT:

Oh now I see, it must be deep water in order to work..
 
Last edited:
Status
Not open for further replies.
Top