SetMarkerIcon: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Server client function}} | {{Server client function}} | ||
This function allows changing the icon of a checkpoint marker. | This function allows changing the icon of a checkpoint marker. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool setMarkerIcon ( marker theMarker, string icon )</syntaxhighlight> | <syntaxhighlight lang="lua"> | ||
bool setMarkerIcon ( marker theMarker, string icon ) | |||
</syntaxhighlight> | |||
{{OOP||[[Marker]]:setIcon|icon|getMarkerIcon}} | |||
===Required Arguments=== | ===Required Arguments=== | ||
Line 11: | Line 13: | ||
* '''icon:''' A string referring to the type of icon, acceptable values are: | * '''icon:''' A string referring to the type of icon, acceptable values are: | ||
**'''"none"''': No icon | **'''"none"''': No icon | ||
**'''"arrow"''': Arrow icon | **'''"arrow"''': Arrow icon. Only 5 arrows can be visible at the same time. | ||
**'''"finish"''': Finish icon (at end of race) | **'''"finish"''': Finish icon (at end of race) | ||
==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"> | <syntaxhighlight lang="lua"> | ||
setMarkerIcon ( | local newMarker = createMarker ( 0, 0, 2, "checkpoint", 1, 255, 0, 0) | ||
setMarkerIcon ( newMarker, "finish" ) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Marker functions}} | {{Marker functions}} |
Latest revision as of 15:44, 4 July 2024
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. Only 5 arrows can be visible at the same time.
- "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 newMarker = createMarker ( 0, 0, 2, "checkpoint", 1, 255, 0, 0) setMarkerIcon ( newMarker, "finish" )
See Also
- createMarker
- getMarkerColor
- getMarkerCount
- getMarkerIcon
- getMarkerSize
- getMarkerTarget
- getMarkerType
- setMarkerColor
- setMarkerIcon
- setMarkerSize
- setMarkerTarget
- setMarkerType
- isElementWithinMarker