Definition
double,double,double GetTerrainAmbient()
Description
This function returns the ambient color of terrain object as three values of red, green and blue. Each value ranges from 0 to 1.
Return Value
Ambient color of terrain object as three values of red, green and blue. Each value ranges from 0 to 1.
Example
red = 0.0 green = 0.0 blue = 0.0 function Init() red, green, blue = GetTerrainAmbient() message = string.format("\nTerrain ambient color is > (%.2f, %.2f, %.2f)" , red, green, blue) PrintConsole(message) end function Update() end
In this example, the GetTerrainAmbient function returns the value of the red, green, and blue components of the ambient color of terrain object. Then these three values are displayed on the console by the PrintConsole function.
GetTerrainAmbient