HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

If a point is in water

08-10-2009, 11:17 PM#1
Fluff
Is there a way to detect if a unit or a point is on water? I need to have something like this as a condition so that a unit will be created at a target location but only if there is water there.
08-10-2009, 11:39 PM#2
chobibo
IsTerrainPathable(0,0,PATHING_TYPE_FLOATABILITY)==false
08-11-2009, 12:17 AM#3
Rising_Dusk
I still recommend this. It distinguishes between shallow water and deep water. If you just want to know 'water,' then chobibo's will work fine. (First two arguments are X,Y)
08-11-2009, 12:27 AM#4
chobibo
It looks like dusk's system works better than just using the native implementation, which is bugged.
08-11-2009, 03:22 AM#5
Fluff
Ok, thanks guys. I will try one or both of these methods tonight.

EDIT: I got Dusk's function to work first try so that's good :P