Skip to content

CreateNavLink

Lets the server’s actors go between two points their walk cannot join - a jump down, a gap, a ladder.

The server’s actors (MoveActor, a chase) and FindPath walk the level’s navmesh; a link joins two places on it that no walk does - the top and the foot of a wall they may jump down, the two ends of a placed bridge the navmesh does not know yet. The navmesh around both ends is rebuilt with it within a couple of seconds. Like a placed object it is written into the map and there after a restart, unless persist = false. The admins’ editor draws them too, and /map navlink makes one where an admin stands.

CreateNavLink(x1, y1, z1, x2, y2, z2 [, opts])
Parameter Type
x1 number metres - where the link starts
y1 number metres
z1 number metres
x2 number metres - where it leads
y2 number metres
z2 number metres
opts table any of radius (how near an end an actor must come, metres, 0.6), twoWay (true; false = from the first point only), type (a word of the mode’s, "jump"), layer ("base"), persist (true) (optional)

number - the link’s id; nil and the reason when the server has no map or the map is read-only

-- the guards may jump down from the wall walk into the yard, not climb back
CreateNavLink(1281.5, 1092.0, 31.2, 1281.5, 1095.0, 26.4, {twoWay = false})

DeleteNavLink · GetNavLinks · FindPath · the The server’s map group of the index