Level Editor/Entities/Map Marker
Jump to navigation
Jump to search
| Map Marker | |
|---|---|
| Made with | Functional > Map Marker |
| What it is | A named spot and facing for a gamemode script to read |
| In the game | Yes, it is exported with the map |
A Map Marker is a named position and direction that a gamemode script asks for by name: where a training dummy stands and which way it looks, the centre of a station, where a prize appears. Because the script uses the name, you can move the marker in the editor without changing the script.
A marker does nothing on its own.
Placing one
- Choose Functional > Map Marker.
- Click where it goes.
- Give it a Marker Name in the inspector.
- It faces the arrow at its feet; turn it with the Rotate tool.
Inspector
| Setting | Type | Default | What it does |
|---|---|---|---|
| Marker Name | Text | empty (the node's name) | The name a script asks for. It must be unique in the map: if two markers share a name, the game keeps the first. |
In a script
api.marker(name) is where it stands, api.marker_facing(name) the way it faces (level, one metre long), and api.markers() lists every marker. A name the map does not have gives the origin and a line in the log.