| 05-10-2005, 10:42 PM | #1 |
I i was wondering if there was a way to find if the "Z" of a position is pathable or ground units are able to walk there. It's like finding if a position is pathable except i want to find if a certian height at that position is pathable. help would be appreciated and rewarded! |
| 05-11-2005, 04:17 AM | #2 |
i don't understand all Z points that coincide with a specific X,Y point are uniformly either pathable or not-pathable ie open ground is pathable to ground units no matter the Z height, a cliff is not pathable to ground units no matter the Z |
| 05-11-2005, 11:51 AM | #3 |
I think that a 5 level cliff at a certain location would be non-pathable at the level of Z that is the same as the top of a 1 level cliff. If this is what you are talking about, I assume that you would have to use that get the Z of a point JASS call, then compare it to the Z of whatever point that is either above it or below it (or equal to it), here, I'll write it out in pseudo code. Code:
function iszpathable takes real X, real Y, real Z returns boolean if (GetPointZ(X, Y) < Z) // the Z point is above the terrain, this is probably pathable, depending on how you decide to handle it // return true //probably if (GetPointZ(X, Y) > Z) //the Z point is below it, do nothing return false if (GetPointZ(X, Y) == Z) return true endfunction That's just some pseudo code, I can't write out the full thing because I gotta go right now. I hope that helps/ is what you want. |
| 05-11-2005, 10:30 PM | #4 |
I figured it out, thanx for the JASS stuff johnfn! |
| 05-12-2005, 10:42 PM | #5 |
It is GetLocationZ not GetPointZ |
| 05-12-2005, 11:16 PM | #6 |
Yes I know. That's why I used the disclaimer that it was psuedo code, because I couldn't remember the actual function name :P |
