| 09-10-2006, 06:24 PM | #1 |
What I'm trying to say is. How can u check if a unit is completely surrounded by something? Perhaps a region that follows the unit and checks if he can reach the edges of it? i dont know replies are greatly appreciated |
| 09-10-2006, 06:39 PM | #2 |
JASS:function CF_UnitIsInValidPath takes unit whichUnit returns boolean return not (IsTerrainPathable(GetUnitX(whichUnit), GetUnitY(whichUnit), PATHING_TYPE_WALKABILITY)) endfunction function CF_LocationIsInValidPath takes location whichLocationreturns boolean return not (IsTerrainPathable(GetLocationX(whichLocation), GetLocationY(whichLocation), PATHING_TYPE_WALKABILITY)) endfunction function CF_LocationIsInValidPathXY takes real X, real Y returns boolean return not (IsTerrainPathable(X, Y, PATHING_TYPE_WALKABILITY)) endfunction |
| 09-10-2006, 07:00 PM | #3 |
| 09-11-2006, 11:44 PM | #4 |
does it need to be done in jass? im not exactly an expert with that stuff |
| 09-11-2006, 11:53 PM | #5 |
http://www.wc3campaigns.net/showthre...531#post827531 Change floatability with walkability, and the expression to true. |
| 09-12-2006, 05:40 PM | #6 | |
Quote:
|
| 09-12-2006, 05:50 PM | #7 |
tide - "does it need to be done in jass? im not exactly an expert with that stuff" my post had a non jass alternative |
