getMarkerTarget
Client-side
Server-side
Shared
Pair: setMarkerTarget
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
This function returns the position of the specified marker's target, the position it points to. This only works for checkpoint markers and ring markers. For checkpoints it returns the position the arrow is pointing to, for ring markers it returns the position the ring is facing. You can set this target with setMarkerTarget.
Syntax
getMarkerTarget ( )Code Examples
server
function nextCheck(thePlayer) local x,y,z = getMarkerTarget(source) -- get the marker target if x ~= false then -- if a target is set for the marker, then... outputChatBox("Next checkpoint at: " .. x .. " " .. y .. " " .. z, thePlayer) -- output a message with the coordinates endendaddEventHandler("onMarkerHit", root, nextCheck) -- add an event handler for the 'onMarkerHit' event