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

[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