setSearchLightStartPosition
Client-side
Server-side
Shared
Pair: getSearchLightStartPosition
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 sets the start position of a searchlight element.
Syntax
setSearchLightStartPosition ( )Code Examples
client
This example creates a searchlight that originates in the camera position and targets the center of the map.
local searchLight = createSearchLight(0, 0, 0, 0, 0, 0, 0, 10)
if searchLight then local function updateSearchLight() -- Set its start position to the camera position setSearchLightStartPosition(searchLight, getCameraMatrix()) end addEventHandler("onClientPreRender", root, updateSearchLight)end