I know one option
Condition:Terrain Type Comparision- Terrain type of possition of triggering unit equal to XY terrain
But you must have all the water with the same tileset and nowhere else can be the same tile
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
function IsPointWaterLoc takes location loc returns boolean
return IsPointWater(GetLocationX(loc),GetLocationY(loc))
endfunction
I don't think i can do it with Jass... Well thanks for help anyways :]
WTF cant we check terrain level in GUI ?
we must be able to like terrain hight level is lower than 0
This condition will check if the point is located on water.
- (Terrain pathing at <your point> of type Floatability is off) Equal to False
why double negative?
Good idea, but sometimes people (like me) decrease the level under deep water.Only for deep water:
Make two dummy units, one that is amphibious, one that's not, both with 0 collision... create them both on the same spot, do a SetUnitPosition(unit, spot_x, spot_y) for both of them (to force an update), and check if they are both still on the same spot... if not, then it MUST be over deep water (if the terrain was cliffs or something, the update would still move them to the same spot, just not the original place).
Well, Do these work if the water level isn't created with cliff's, Cause i made the water level by creating the map with swallow water, And heighened the terrain at some spot's so it would look nicer... Gotta try out some of those, Thanks again for helping me out :]