Skip to content
KCKingdoms Connected Scripting APIScripting guides and API
Runtime classClient APIGenerated

Blip

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

A mark this client owns on the game’s compass and map screen.

new Blip(id): Blip

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

Creates a handle for a blip that already exists; use Blip.create() to make one.

number

Identifier of an existing blip.

Blip

remove(): boolean

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

Takes this blip off the compass and the map screen and out of the registry.

boolean

True when it was still there to remove.


toString(): string

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

Formats this blip handle for logging and debugging.

string

The blip’s id, its type and its position, or a note that it is gone.


static all(): Blip[]

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

Lists every blip this client’s scripts made. Blips the server placed are not included.

Blip[]

One handle per live blip, in creation order.


static create(options): Blip | null

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

Puts a mark on this client’s compass and map screen and keeps it there, rebuilding it whenever the game drops it.

Where the blip goes, and optionally which icon to draw it with, what state to give it, what the map screen calls it, whether it shows on the compass and the map screen – both, by default – and whether the map legend’s switch for its icon hides it, as by default. type is one of the game’s own compass mark names – Checkpoint, QuestGiver, Shop, GeneralPoi and the rest – and defaults to GeneralPoi; an unknown one is rejected rather than guessed at.

boolean

string

boolean

boolean

Vector3

number

string

Blip | null

The new blip, or null at the blip limit.


static getById(id): Blip | null

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

Looks a blip up by its id.

number

Blip identifier.

Blip | null

The blip’s handle, or null when it no longer exists.


static removeAll(): void

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

Takes every blip this client’s scripts made off the compass and the map screen, leaving the server’s blips and the game’s own marks alone.

void

compass: boolean

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

Whether the blip is drawn on the HUD compass. True by default.


readonly id: number

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

Identifier of this blip, unique for the lifetime of the session. Ids are not reused.


label: string

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

The blip’s name on the map screen, shown verbatim in place of the name the game gives its icon type; empty keeps that name. A compass mark has no text, so the compass never shows it.


legend: boolean

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

Whether the map legend’s switch for the blip’s icon type hides it, as it does the game’s own marks of that type. True by default. False keeps it on the map screen whatever that switch says, so a script can hide the game’s own marks of a type with WorldMap.setCategoryVisible and still draw its own with the same icon.


readonly live: boolean

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

Whether the compass currently carries a mark for this blip. It goes false on its own whenever the game empties the compass – a level load does – and back to true on the next tick.


map: boolean

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

Whether the blip is drawn on the map screen. True by default, but only for an icon the map has art for: Main, Side, Micro, Checkpoint, Dlcs, Bailiff, FistFight and Racing have none and stay on the compass. The map legend’s switch for the blip’s icon type hides it like one of the game’s own unless legend is false, and a change to a blip on the open map is redrawn within a frame.


position: Vector3

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

World-space position in metres. The compass recomputes bearing and distance from it every frame, so assigning moves the mark with no rebuild.


state: number

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

The mark’s state, forwarded to the compass movie as-is. What a given value draws is undocumented; 0 is what a fresh mark carries.


type: string

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

Which of the game’s own compass icons the mark draws as, by the game’s own name for it. Assignment rebuilds the native mark, because the icon is read once when a mark is registered and never re-read.


readonly valid: boolean

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

Whether the blip is still in the registry. A handle to a removed blip keeps reading, and every other property reads as its default.