Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Global objectClient APIGenerated

WorldMap

const WorldMap: object

Defined in: client/api.d.ts:1835

The map screen at this machine, and the player’s own marker on it. Nothing here is replicated: a marker everyone should see is one the server tells every client to make.

readonly isOpen: boolean

Whether the map screen is up right now. False in the main menu and across a level load, when there is no map page at all.

clearWaypoint(): boolean

Takes the player’s marker off the map they are looking at. It runs the game’s own removal, so mapWaypointCleared is raised as it would be for the player.

boolean

True when there was a marker to take off.

getWaypoint(): MapWaypoint | null

Reads the marker the player has dropped on the map they are looking at. The game keeps at most one per map.

MapWaypoint | null

The marker’s position and the map it belongs to, or null when there is none.

isCategoryVisible(type): boolean

Whether marks of this type are currently drawn on the compass and listed in the map legend.

string

One of the game’s own compass mark types, spelled the way the game spells it – Shop, QuestGiver, GeneralPoi. The full list is the type a Blip accepts.

boolean

True when they are shown.

moveWaypoint(position): boolean

Moves the marker the player has already dropped. It cannot create one, so it reads false when there is nothing down.

Vector3

Where to put it, in world-space metres. Nothing snaps it to the terrain.

boolean

True when there was a marker to move.

setCategoryVisible(type, visible): boolean

Shows or hides a whole category of the game’s own map markers – every shop, every quest giver – through the switch the map legend’s rows drive. It affects the marks already placed as well as later ones. DLC icons share a legend row with the entry they belong to, so setting one sets the group.

string

One of the game’s own compass mark types, spelled the way the game spells it – Shop, QuestGiver, GeneralPoi. The full list is the type a Blip accepts.

boolean

Whether marks of that type should be drawn.

boolean

True when the map page was there to take it.