SetLightShininess

Definition

SetLightShininess(string lightObjectName, float shininess)

Description

This function sets the shininess of light object lightObjectName.

Parameters

lightObjectName
Specifies the name of the light object. You can also use the name “this” for this parameter. In this case, “this” refers to the light object name to which this script is attached.

shininess
Specifies the shininess of light lightObjectName. This value must be greater than or equal to 0.0.

Example 1

function Init()
    SetLightShininess("light1", 100.0)
end

function Update()

end
In this example, the SetLightShininess function sets the shininess value of of light “light1” to  100.0.

Example 2

--Name of script is SetLightShininess2.lua

function Init()
    SetLightShininess("this", 100.0)
end

function Update()

end
Assume that the above script named SetLightShininess2.lua is attached to the light object named “light1”. In this case, string “this”  in the SetLightShininess function will be equal to “light1”. In our example, the function SetLightShininess sets the shininess value of current light (for example light “light1”) to 100.0.
adminSetLightShininess