SetLightStreamRadius - GalaxHD551/lightstreamer GitHub Wiki

Description

Set the stream radius of the light, usefull for saving performance with light that are placed in building and can't be visible at long range.

  • A stream radius higher than 12000.0 could make some error in the server logs, you have to increase the streaming distance for object in the server_config.json.
  • 13000.0 is the max stream radius allowed for lighting, beyond this limit the game will not show the light.

Syntax

lr.SetLightStreamRadius(lightid, radius)

Parameters

  • lightid

    The light identifier.

  • radius

    The stream radius.

Return Value

  • Returns true on success.

Exemple

lr = ImportPackage("lightstreamer")

function cmd_light(player)
	local x, y, z = GetPlayerLocation(player)
        lightid = lr.CreateLight("SPOTLIGHT", x, y, z)
        lr.SetLightStreamRadius(lightid, 6000)
	AddPlayerChat(player, "The stream radius has been changed")

end
AddCommand("light", cmd_light)