... | ... | @@ -115,3 +115,21 @@ If you only want to know the number of nodes in the network then you can simply |
|
|
```lua
|
|
|
mapping:get_node_count()
|
|
|
```
|
|
|
|
|
|
## Special Node Types
|
|
|
|
|
|
### Stairs Nodes
|
|
|
|
|
|
Nodes are normally only connected to other nodes that are both in range and on the same layer. Stairs nodes, however, can span multiple layers and are connected to other nodes in range that are on any of those layers.
|
|
|
|
|
|
To designate a node to behave as stairs, add the custom property `"layers"` and for its value list all the layers that it should be connected to, using commas or spaces (or both) to separate each one (e.g. `"1, 2, 3"`).
|
|
|
|
|
|
When a stairs node is used to change layers, the layer variable returned by `node_map:next_node()` will be a number giving the new layer to transition to (when the entity being moved is at the stairs node).
|
|
|
|
|
|
### Teletransporter Nodes
|
|
|
|
|
|
Teletransporter nodes provide a way to instantly travel between two nodes regardless of which layer they are on or the distance apart. A teletransporter node is connected to every other teletransporter node on the map.
|
|
|
|
|
|
To designate a node to behave as a teletransporter, add the custom property `"node_type"` with a value of `"teletransporter"`.
|
|
|
|
|
|
When traveling between two teletransporter nodes, `node_map:next_node()` will return an action variable with a value of `"teletransporter"` indicating that the travel to the next node should be instant. |
|
|
\ No newline at end of file |