|
发表于 2008-3-27 12:27:05
|
显示全部楼层
对于一个点判断它的路径属性
[codes=jass]native IsTerrainPathable takes real x, real y, pathingtype t returns boolean
constant pathingtype PATHING_TYPE_ANY = ConvertPathingType(0)
constant pathingtype PATHING_TYPE_WALKABILITY = ConvertPathingType(1)
constant pathingtype PATHING_TYPE_FLYABILITY = ConvertPathingType(2)
constant pathingtype PATHING_TYPE_BUILDABILITY = ConvertPathingType(3)
constant pathingtype PATHING_TYPE_PEONHARVESTPATHING = ConvertPathingType(4)
constant pathingtype PATHING_TYPE_BLIGHTPATHING = ConvertPathingType(5)
constant pathingtype PATHING_TYPE_FLOATABILITY = ConvertPathingType(6)
constant pathingtype PATHING_TYPE_AMPHIBIOUSPATHING = ConvertPathingType(7)
[/codes]
需注意返回true的话是不可建造,false的才是可建造。。
对于具体建筑需要一定空间的,可以通过一个辅助单位来发布建造命令,判断其返回值
[codes=jass]native IssueBuildOrder takes unit whichPeon, string unitToBuild, real x, real y returns boolean[/codes] |
|