[Trigger] Need Help with Pathing Detection

Status
Not open for further replies.
Level 5
Joined
Apr 3, 2006
Messages
112
I am using a simple GUI projectile system for my map, and the problem I am running into is an error I keep getting for using a custom script that detects terrain pathability. I am not very good at triggers so I checked out some maps for reference and decided to use a boolean that will check if a point is pathable.

The custom script goes like this: "set udg_Walkable = IsTerrainWalkable (GetLocationX(udg_TempLoc02), GetLocationY(udg_TempLoc02))"

Walkable is the boolean variable, and TempLoc01 and TempLoc02 are point variables (TempLoc02 is for where the projectile will land next). However, I keep getting an error that says expected a name. What am I doing wrong, am I missing something?
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
This could be usefull (part with checking pathing) or you can use Jass system found is Jass resources =)

However, in GUI you should use:
  • Set Walkable = (Terrain pathing at TempLoc02 of type Walk able is off)
  • Custom script: set udg_Walkable = IsTerrainPathable(GetLocationX(udg_TempLoc02), GetLocationY(udg_TempLoc02), PATHING_TYPE_WALKABILITY)
Types of terrain pathing if you want to use custom scripts or jass:

Any - PATHING_TYPE_ANY
Walk able - PATHING_TYPE_WALKABILITY
Fly able - PATHING_TYPE_FLYABILITY
Build able - PATHING_TYPE_BUILDABILITY
Pathing for peons - PATHING_TYPE_PEONHARVESTPATHING
On bligth - PATHING_TYPE_BLIGHTPATHING
Float able - PATHING_TYPE_FLOATABILITY
Water pathing - PATHING_TYPE_AMPHIBIOUSPATHING
 
Level 17
Joined
Apr 27, 2008
Messages
2,455
But if i remember correctly it the returns the opposite of what it should (true if the pathing type is off and false if the pathing is one).

So it should be that :

JASS:
set udg_Walkable = not IsTerrainPathable(GetLocationX(udg_TempLoc02), GetLocationY(udg_TempLoc02), PATHING_TYPE_WALKABILITY)
 
Status
Not open for further replies.
Top