• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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