GetLightShininess

Definition

double GetLightShininess(string lightObjectName)

Description

This function returns the shininess of lightObjectName light object.

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.

Return Value

Returns the shininess of lightObjectName light.

Example 1

shininess = 0.0

function Init()
    shininess  = GetLightShininess("light1")

    message = string.format("\nLight shininess is > %.2f" ,shininess)
    PrintConsole(message)
end

function Update()

end
In this example, the GetLightShininess function returns the shininess value of of light “light1”. Then shininess value is displayed on the console by the PrintConsole function.

Example 2

--Script name is GetLightShininess2.lua

shininess = 0.0

function Init()
    shininess  = GetLightShininess("this")

    message = string.format("\nLight shininess is > %.2f" ,shininess)
    PrintConsole(message)
end

function Update()

end
Assume that the above script named GetLightShininess2.lua is attached to the light object named “light1”. In this case, string “this”  in the GetLightShininess function will be equal to “light1”. In our example, the function GetLightShininess returns the shininess value of the light “light1”.
adminGetLightShininess