DuplicateLight - GalaxHD551/lightstreamer GitHub Wiki

Description

This function duplicate an existing light with all its attribute.

Syntax

lr.DuplicateLight(lightid)

Parameters

  • lightid

    The lightID you want to copy.

Return Value

  • Returns an identifier to the duplicated light. false on error.

Exemple

lr = ImportPackage("lightstreamer")

function cmd_light(player)
	local x, y, z = GetPlayerLocation(player)
        lightid = lr.CreateLight("POINTLIGHT", x, y, z)
	copylight = lr.DuplicateLight(lightid)
end
AddCommand("light", cmd_light)