SetMarkerIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Removed note, fixed example)
mNo edit summary
Line 19: Line 19:
This example creates a finish marker as you'd expect for the end of a race.
This example creates a finish marker as you'd expect for the end of a race.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local marker = createMarker(4,4,4 'checkpoint', 10, 255,0,0)  
local marker = createMarker(4,4,4, 'checkpoint', 10, 255,0,0)  
setMarkerIcon(marker, 'finish')
setMarkerIcon(marker, 'finish')
</syntaxhighlight>
</syntaxhighlight>

Revision as of 12:23, 10 October 2023

This function allows changing the icon of a checkpoint marker.

Syntax

bool setMarkerIcon ( marker theMarker, string icon )

OOP Syntax Help! I don't understand this!

Method: Marker:setIcon(...)
Variable: .icon
Counterpart: getMarkerIcon


Required Arguments

  • theMarker: The marker to change the visual style of
  • icon: A string referring to the type of icon, acceptable values are:
    • "none": No icon
    • "arrow": Arrow icon
    • "finish": Finish icon (at end of race)

Example

This example creates a finish marker as you'd expect for the end of a race.

local marker = createMarker(4,4,4, 'checkpoint', 10, 255,0,0) 
setMarkerIcon(marker, 'finish')

See Also