Skip to content

Components

NavLink

A jump between two points a walk cannot connect: a drop, a ladder, a teleport, a grapple anchor. One-way by default; turn on Both Ways to make it usable from either end.

On this page

Add it

+ Add node → Nav Link creates a node with it already on. Already have a node for it? Add component → NavLinkComponent.

From a script

A script on the same node writes these fields by name. NavLinkComponent is the name to pass.

rgs
set_point("NavLinkComponent", "from", vec2(0.0, 0.0));
set_point("NavLinkComponent", "to", vec2(0.0, -64.0));
set_flag("NavLinkComponent", "both_ways", false);
set_flag("NavLinkComponent", "enabled", true);
set_number("NavLinkComponent", "cost", 1.0);
set_flag("NavLinkComponent", "teleport", false);

Fields

FieldScript nameKindDefaultWhat it does
Fromfromtwo numbers (x, y)(0, 0)Where it starts, relative to the node.
Tototwo numbers (x, y)(0, -64)Where it ends, relative to the node.
Both Waysboth_wayscheckboxoffWhether it can also be travelled backwards.
EnabledenabledcheckboxonWhether it is usable right now.
Costcostnumber, at least 01How many times dearer crossing it is than walking as far; below one it is a shortcut.
TeleportteleportcheckboxoffPuts its walker at the far end at once instead of carrying it along.