Skip to content

path Block

Sub-commandPathfindingNew in Reforged
path block {x} {y} [{x2} {y2}] [facet]
Sets
#PathState

Also searchable as: path Block · obstacle

path block marks the place x, y, or the rectangle from x, y to x2, y2, as impassable for path find, at every height. Use it for what the map files don’t know about: a player house, a locked door, a spot where you got stuck.

facet is a number as in #CursKind; the default is the facet you are on. A diagonal step that would brush past a blocked place is not taken either, as with a wall.

Blocks last until path unblock, path clear or the script is started again. #PathState is ok, or error: … for bad arguments.

path block 1450 1680 1460 1690 ; a house on the way
path find 1500 1690
display ok #PathState - #PathCnt steps
halt

See also