| 04-19-2006, 04:03 AM | #1 |
I'm going to be moving a unit in a straight line via a timer; However, I'd like to make sure where I'm moving it to is a viable place for it to go; IE: if it hits a wall of trees, it stops, or a cliff, it stops, etc. Do the native SetUnitX/Y/Position functions check that? If not, is there a function that does? |
| 04-19-2006, 08:41 AM | #2 |
http://www.wc3jass.com/viewtopic.php?t=2374 Using call CheckPathability(x, y) will return false if its not pathable Just check the next 100 radius X/Y each time you're moving the unit, or around 35 radius if you want collision of units too. |
| 04-19-2006, 05:10 PM | #3 | |
Quote:
I ended up using IsTerrainPathable(x, y, pathingtype) with PATHING_TYPE_WALKABILITY, and used Vex's caster system's Collision Missiles for collision with units. |
