Class: CMapLocation
A single PDA/minimap spot attached to an object or user position.
Source
C++ class CMapLocation
Custom Constructor
CMapLocation
Remarks
Map locations are created by the engine or map manager. The native binding does not expose a script constructor. A location can also expire or be removed by object lifetime, TTL, or task cleanup.
Constructors
Constructor
protected new CMapLocation(): CMapLocation;Engine-created map location.
Returns
CMapLocation
Methods
Collidable()
Collidable(): boolean;Returns
boolean
Whether the map spot participates in UI collision.
DisablePointer()
DisablePointer(): void;Hide the off-screen pointer arrow.
Returns
void
DisableSpot()
DisableSpot(): void;Hide the map spot.
Returns
void
EnablePointer()
EnablePointer(): void;Show the off-screen pointer arrow.
Returns
void
EnableSpot()
EnableSpot(): void;Show the map spot.
Returns
void
GetHint()
GetHint(): Nullable<string>;Returns
Nullable<string>
Hint text shown for the spot.
Remarks
Returns null when hints are disabled for this spot.
GetLastPosition()
GetLastPosition(): vector2;Returns
Last calculated spot position.
Remarks
This is a cached value updated by the map manager.
GetLevelName()
GetLevelName(): string;Returns
string
Level name where the spot is located.
Remarks
This is a cached value updated by the map manager.
GetPosition()
GetPosition(): vector2;Returns
Current spot position on the map.
Remarks
This is a cached value updated by the map manager.
HighlightSpot()
HighlightSpot(state: boolean, color: fcolor): void;Highlight or clear the spot highlight.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | boolean | Whether highlighting is enabled. |
color | fcolor | Highlight color. |
Returns
void
Remarks
Requires a location type with a level-map spot. Types that only define minimap or complex-map visuals are not good candidates for this helper.
HintEnabled()
HintEnabled(): boolean;Returns
boolean
Whether a hint can be shown for the spot.
IsUserDefined()
IsUserDefined(): boolean;Returns
boolean
Whether this is a user-created spot.
ObjectID()
ObjectID(): number;Returns
number
Object id this spot tracks.
PointerEnabled()
PointerEnabled(): boolean;Returns
boolean
Whether the off-screen pointer arrow is enabled.
Remarks
Pointer state also depends on SpotEnabled(). A disabled spot reports its pointer as disabled.
SetHint()
SetHint(hint: string): void;Set hint text shown for the spot.
Parameters
| Parameter | Type | Description |
|---|---|---|
hint | string | Hint text or string table id. |
Returns
void
Remarks
Passing disable_hint disables hints and clears the stored hint.
SetUserDefinedFlag()
SetUserDefinedFlag(state: boolean): void;Mark the spot as user-created or engine-owned.
Parameters
| Parameter | Type | Description |
|---|---|---|
state | boolean | User-defined flag. |
Returns
void
SpotEnabled()
SpotEnabled(): boolean;Returns
boolean
Whether the map spot is enabled.
Remarks
Disabling a spot also makes PointerEnabled() return false.
SpotSize()
SpotSize(): vector2;Returns
Spot size on the map.
Remarks
Reads the level-map spot size. Use only for location types that define a level-map spot in map_spots.xml.