SetMarkerIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (normalize page to match others)
(hi mta staff, add note)
Line 12: Line 12:
**'''"arrow"''': Arrow icon
**'''"arrow"''': Arrow icon
**'''"finish"''': Finish icon (at end of race)
**'''"finish"''': Finish icon (at end of race)
<!-- This example is wrong, the marker is not created if you check with 'isElement(theMarker)' -->


==Example==
==Example==
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">theMarker = createMarker ( 1000, 1000, 1000, 0, 255, 0, 0 )  
<syntaxhighlight lang="lua">
setMarkerIcon ( theMarker, "finish" )</syntaxhighlight>
theMarker = createMarker ( 1000, 1000, 1000, 0, 255, 0, 0 )  
setMarkerIcon ( theMarker, "finish" )
</syntaxhighlight>


==See Also==
==See Also==
{{Marker functions}}
{{Marker functions}}

Revision as of 09:51, 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.

theMarker = createMarker ( 1000, 1000, 1000, 0, 255, 0, 0 ) 
setMarkerIcon ( theMarker, "finish" )

See Also