I would just want to get a condition that checks if a unit can walk at the point or not from the areas that are inside playable map.What do you try to detect? If the point is out of the playable map area?
I don't understand that part, how do I get the boolean into a condition trigger after that? Is the boolean returned as some variable?
Do I need only GetVarObject 3.0.0.5 with that? I get error //! runtextmacro LUA_FILE_HEADER() unable to find textmacro "LUA_FILE_HEADER"
library IsPathable /* v1.0.1.2
*************************************************************************************
*
* The IsTerrainPathable native does not work.
*
* This library will also check if a point is currently pathable. Will even be
* able to detect buildings and large clusters of units (avoids the 1024 warcraft
* limit to pathing by checking via a loop).
*
************************************************************************************
*
* */uses/*
*
* */ WorldBounds /* hiveworkshop.com/forums/jass-functions-413/snippet-worldbounds-180494/
*
************************************************************************************
*
* constant integer PATH_TYPE_AMPHIBIOUS
* constant integer PATH_TYPE_BLIGHT
* constant integer PATH_TYPE_BUILDABILITY
* constant integer PATH_TYPE_FLOATABILITY
* constant integer PATH_TYPE_FLYABILITY
* constant integer PATH_TYPE_WALKABILITY
*
* function IsPathable takes integer x, integer y, integer pathingType returns boolean
* - i.e. call IsPathable(0,0,PATH_TYPE_AMPHIBIOUS)
*
************************************************************************************/
JASS://! externalblock extension=lua ObjectMerger $FILENAME$ //! runtextmacro LUA_FILE_HEADER() //! i dofile("GetVarObject") //! i local function create(id,pt) //! i createobject("hwtw", id) //! i makechange(current, "unsf", "( " .. pt .. " )") //! i makechange(current, "upat", "") //! i makechange(current, "ushb", "") //! i makechange(current, "uubs", "") //! i makechange(current, "uabr", "0") //! i makechange(current, "uabt", "") //! i makechange(current, "ucol", "16") //! i makechange(current, "usid", "") //! i makechange(current, "usin", "") //! i if (pt~="blighted") then //! i makechange(current, "upap", pt) //! i else //! i makechange(current, "upar", pt) //! i makechange(current, "upap", "") //! i end //! i if (pt=="unflyable") then //! i makechange(current, "umvt", "fly") //! i elseif (pt=="unamph") then //! i makechange(current, "umvt", "amph") //! i elseif (pt=="unfloat") then //! i makechange(current, "umvt", "float") //! i else //! i makechange(current, "umvt", "foot") //! i end //! i end //! i create(getvarobject("hwtw", "units", "UNITS_PATH_" .. "unflyable", true),"unflyable") //! i create(getvarobject("hwtw", "units", "UNITS_PATH_" .. "unamph", true),"unamph") //! i create(getvarobject("hwtw", "units", "UNITS_PATH_" .. "unbuildable", true),"unbuildable") //! i create(getvarobject("hwtw", "units", "UNITS_PATH_" .. "unwalkable", true),"unwalkable") //! i create(getvarobject("hwtw", "units", "UNITS_PATH_" .. "unfloat", true),"unfloat") //! i create(getvarobject("hwtw", "units", "UNITS_PATH_" .. "blighted", true),"blighted") //! i updateobjects() //! endexternalblock
Is there something wrong with the test map? My newgen editor can't open the file. It says main map file could not be opened. Can it check if the location is flyable too?
Can it check if the location is flyable too?