Other great resources: Official JS API docs, Scripting Forum
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Next »
setSunIntensity(aR, aG, aB, dR, dG, dB, sR, sG, sB);
Ambient Red light.
Game default: 0.5
0.5
Ambient Green light.
Ambient Blue light.
Diffuse Red light.
Diffuse Green light.
Diffuse Blue light.
Specular Red light.
Game default: 0.8
0.8
Specular Green light.
Specular Blue light.
Does not return anything. Does not seem to throw any errors either, even if completely invalid values are passed in.
This video explains ambient, diffuse and specular lighting:
Currently this function only affects lighting applied to the PIE models of Game objects. It does not affect map terrain or base structure foundations.
To illustrate, an aR value of 100 was used to make all affected items bright red:
// set default lighting levels setSunIntensity(0.5. 0.5, 0.5, // ambient 0.5, 0.5, 0.5, // diffuse 0.8, 0.8, 0.8); // specular
Requires:
Jump to:
Related articles: