Level Editor/Entities/Map Marker: Difference between revisions
Jump to navigation
Jump to search
TeamSpecBot (talk | contribs) Level Editor: Map Marker page |
TeamSpecBot (talk | contribs) American spelling |
||
| Line 5: | Line 5: | ||
| exported = yes | | exported = yes | ||
}} | }} | ||
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 | 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 center 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. | A marker does nothing on its own. | ||
| Line 21: | Line 21: | ||
== In a script == | == In a script == | ||
[[Level Editor/Scripting/Reference/GamemodeServerApi#marker|api.marker(name)]] is where it stands, [[Level Editor/Scripting/Reference/GamemodeServerApi#marker_facing|api.marker_facing(name)]] the way it faces (level, one | [[Level Editor/Scripting/Reference/GamemodeServerApi#marker|api.marker(name)]] is where it stands, [[Level Editor/Scripting/Reference/GamemodeServerApi#marker_facing|api.marker_facing(name)]] the way it faces (level, one meter long), and [[Level Editor/Scripting/Reference/GamemodeServerApi#markers|api.markers()]] lists every marker. A name the map does not have gives the origin and a line in the log. | ||
{{Level Editor nav}} | {{Level Editor nav}} | ||
Latest revision as of 04:44, 20 October 2026
| 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 center 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 meter long), and api.markers() lists every marker. A name the map does not have gives the origin and a line in the log.