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
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| From | from | two numbers (x, y) | (0, 0) | Where it starts, relative to the node. |
| To | to | two numbers (x, y) | (0, -64) | Where it ends, relative to the node. |
| Both Ways | both_ways | checkbox | off | Whether it can also be travelled backwards. |
| Enabled | enabled | checkbox | on | Whether it is usable right now. |
| Cost | cost | number, at least 0 | 1 | How many times dearer crossing it is than walking as far; below one it is a shortcut. |
| Teleport | teleport | checkbox | off | Puts its walker at the far end at once instead of carrying it along. |