SetBarnDoorLength - GalaxHD551/lightstreamer GitHub Wiki

Description

Set the length of the barn door attached to the Rect Light.

Syntax

lr.SetBarnDoorAngle(lightid, length)

Parameters

  • lightid

    The light identifier.

  • lenght

    The length of the barn door.

Return Value

  • Returns true on success.

Exemple

lr = ImportPackage("lightstreamer")

function OnPackageStart()
	local door = CreateDoor(1, 126016.046875, 81475.203125, 1550.0, 30)
	local x, y, z = GetDoorLocation(door)
	local light = lr.CreateLight("RECTLIGHT", x, y, z + 50)
	lr.SetBarnDoorLength(light, 120)
end
AddEvent("OnPackageStart", OnPackageStart)