Skip to main content

Marker

A marker pack marker.

note

A majority of these fields simply reflect the marker attributes (any without a description). More information on attributes can be found in the attributes section.

Fields

FieldTypeDescription
Alphanumber
AutoTriggerboolean
BehaviorFilteredboolean[READ-ONLY] Indicates if the marker is actively filtered by a behavior.
BehaviorsIBehavior[]A list of behaviors attached to the marker.
CanFadeboolean
CategoryCategory[READ-ONLY] The parent category of the marker
CullDirectioninteger
DistanceToPlayernumber
DrawOrdernumber
FadeFarnumber
FadeNearnumber
Focusedboolean
Guidany
HeightOffsetnumber
InGameVisibilityany
InvertBehaviorboolean
MapDisplaySizenumber
MapIdinteger[READ-ONLY]
MapVisibilityboolean
MaxSizenumber
MiniMapVisibilityboolean
MinSizenumber
PositionVector3
ResetLengthnumber
RotationXyzVector3
ScaleOnMapWithZoomboolean
Sizenumber
TextureTexture
TintColor
TipDescriptionstring
TipNamestring
TriggerRangenumber

Functions

FunctionDescription
FocusFocuses the marker.
UnfocusUnfocuses the marker.
InteractTriggers the marker.
SetPos(x, y, z)Sets the x,y,z position of the marker.
SetPos(vector)Sets the x,y,z position of the marker.
SetPosXSet the X coordinate of the marker.
SetPosYSet the Y coordinate of the marker.
SetPosZSet the Z coordinate of the marker.
SetRot(x, y, z)Set the rotation of the marker (in radians).
SetRot(vector)Set the rotation of the marker (in radians).
SetRotXSet the x rotation of the marker (in radians).
SetRotYSet the y rotation of the marker (in radians).
SetRotZSet the z rotation of the marker (in radians).
RemoveRemoves the marker.
SetTexture(texturePath)Sets the texture of the marker.
SetTexture(textureId)Sets the texture of the marker using an asset from the public CDN.
GetBehaviorReturns any matching behavior by its type name.


Marker:Focus()

Focuses the marker.

Usage

script.lua
some_marker:Focus()


Marker:Unfocus()

Unfocuses the marker.

Usage

script.lua
some_marker:Unfocus()


Marker:Interact(isAutoTriggered)

Triggers the marker.

Parameters

ParameterTypeDescription
isAutoTriggeredbooleanIndicates if the trigger was from an auto trigger or if it was manually triggered.

Usage

script.lua
some_marker:Interact(true)


Marker:SetPos(x, y, z)

Sets the x,y,z position of the marker.

Parameters

ParameterTypeDescription
xnumberThe X coordinate to set the marker to.
ynumberThe Y coordinate to set the marker to.
znumberThe Z coordinate to set the marker to.

Usage

script.lua
some_marker:SetPos(0, 0, 0)


Marker:SetPos(vector)

Sets the x,y,z position of the marker.

Parameters

ParameterTypeDescription
vectorVector3The position to set the marker to.

Usage

script.lua
some_marker:SetPos(a_vector_3)


Marker:SetPosX(x)

Set the X coordinate of the marker.

Parameters

ParameterTypeDescription
xnumberThe X coordinate to set the marker to.

Usage

script.lua
some_marker:SetPosX(0)


Marker:SetPosY(y)

Set the Y coordinate of the marker.

Parameters

ParameterTypeDescription
ynumberThe Y coordinate to set the marker to.

Usage

script.lua
some_marker:SetPosY(0)


Marker:SetPosZ(z)

Set the Z coordinate of the marker.

Parameters

ParameterTypeDescription
znumberThe Z coordinate to set the marker to.

Usage

script.lua
some_marker:SetPosZ(0)


Marker:SetRot(x, y, z)

Set the rotation of the marker (in radians).

Parameters

ParameterTypeDescription
xnumberThe X rotation to set the marker to.
ynumberThe Y rotation to set the marker to.
znumberThe Z rotation to set the marker to.

Usage

script.lua
some_marker:SetRot(0, 0, 0)


Marker:SetRot(vector)

Set the rotation of the marker (in radians).

Parameters

ParameterTypeDescription
vectorVector3The rotation to set the marker to.

Usage

script.lua
some_marker:SetRot(a_vector_3)


Marker:SetRotX(x)

Set the x rotation of the marker (in radians).

Parameters

ParameterTypeDescription
xnumberThe X rotation to set the marker to.

Usage

script.lua
some_marker:SetRotX(0)


Marker:SetRotY(y)

Set the y rotation of the marker (in radians).

Parameters

ParameterTypeDescription
ynumberThe Y rotation to set the marker to.

Usage

script.lua
some_marker:SetRotY(0)


Marker:SetRotZ(z)

Set the z rotation of the marker (in radians).

Parameters

ParameterTypeDescription
znumberThe Z rotation to set the marker to.

Usage

script.lua
some_marker:SetRotZ(0)


Marker:Remove()

Removes the marker.

Usage

script.lua
some_marker:Remove()


Marker:SetTexture(texturePath)

Sets the texture of the marker.

Parameters

ParameterTypeDescription
texturePathstringThe relative path to the texture (relative to the root of the marker pack).

Usage

script.lua
some_marker:SetTexture("path/to/texture")


Marker:SetTexture(textureId)

Sets the texture of the marker using an asset from the public CDN.

Parameters

ParameterTypeDescription
textureIdintegerThe relative path to the texture (relative to the root of the marker pack).

Usage

script.lua
-- TODO: use a real texture id
some_marker:SetTexture(123456789)


Marker:GetBehavior(behaviorName)

Returns any matching behavior by its type name.

Parameters

ParameterTypeDescription
behaviorNamestringThe name of the behavior type.

Returns | IBehavior

The behavior if found, otherwise nil.

Usage

script.lua
some_marker:GetBehavior("some_behavior")