Skip to content

MapIcon

An icon your gamemode put on the radar and the map with mapIcons.create, as mapIcons.listAll, mapIcons.getById and the scriptMarkerCreated events give it. It does not change; read it again for a newer one.

type MapIcon = Readonly<{
markerKind: "mapIcon"; id: number; icon: number; position: Vector3; colorRgba: number; range: number;
interior: number; virtualWorld: number; visible: boolean; players: readonly number[] | null;
}>;
type MapIconSettings = MarkerTargeting & { position: Vector3; icon?: number; colorRgba?: number; range?: number };
Field Type Description
markerKind "mapIcon" Tells it apart from the other world markers.
id number Its ID.
icon number One of the game’s radar icons, 0 to 63.
position Vector3 Where it is.
colorRgba number The plain dot’s (icon 0) color, 0xRRGGBBAA.
range number How near a player must be to see it, in metres; 0 is the whole map.
interior, virtualWorld, visible, players Who sees it; see MarkerTargeting. players holds player IDs, or null for everyone.

MapIconSettings has the same fields, all but position optional; the defaults are on mapIcons.create.