What it does
light.createSpot creates a Spot in light. It takes id, x, y, z, dX, dY, dZ, angle and exponent. angle and exponent are optional.
Signature
light.createSpot(id, x,y,z, dX,dY,dZ, angle?, exponent?)Arguments
idxyzdXdYdZangleoptionalexponentoptional
Example · generated
function start() { light.createSpot('spot', 0, 2, 0, 0, 2, 0);}light.createSpot is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.