- Documentation
- Server functions
- setMarkerTarget
Function
setMarkerTarget
Sets the point a ring or checkpoint points at (in races - the next point on the route). Without coordinates it removes the target.
Syntax
bool setMarkerTarget(marker theMarker [, float x = nil, float y = nil, float z = nil])Arguments
theMarkermarker- The marker.
xfloat, optional = nil- Target X.
yfloat, optional = nil- Target Y.
zfloat, optional = nil- Target Z.
Returns
true on success.
Example
local route = { {0, 0, 3}, {100, 0, 3}, {200, 50, 3} }
for i = 1, #route - 1 do
local p, nxt = route[i], route[i + 1]
local m = createMarker(p[1], p[2], p[3], "ring", 6)
setMarkerTarget(m, nxt[1], nxt[2], nxt[3])
end
Notes
State for scripts. The game does not turn the marker towards the target yet.