Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Change the lighting effects applied to game objects... |
Syntax
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
setSunIntensity(aR, aG, aB, dR, dG, dB, sR, sG, sB); |
Properties
Property | Type | Mandatory | Notes | Game Version |
---|---|---|---|---|
aR | Number | Ambient Red light. Game default: | 3.2 | |
aG | Number | Ambient Green light. Game default: | 3.2 | |
aB | Number | Ambient Blue light. Game default: | 3.2 | |
dR | Number | Diffuse Red light. Game default: | 3.2 | |
dG | Number | Diffuse Green light. Game default: | 3.2 | |
dB | Number | Diffuse Blue light. Game default: | 3.2 | |
sR | Number | Specular Red light. Game default: | 3.2 | |
sG | Number | Specular Green light. Game default: | 3.2 | |
sB | Number | Specular Blue light. Game default: | 3.2 |
Return value
Does not return anything. Does not seem to throw any errors either, even if completely invalid values are passed in.
Notes
This video explains ambient, diffuse and specular lighting:
Widget Connector | ||||||
---|---|---|---|---|---|---|
|
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:
Example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// 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 ); |
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
|
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Div | ||
---|---|---|
| ||
See alsoRelated articles:
|