Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
setSunIntensity(aR, aG, aB, dR, dG, dB, sR, sG, sB);

Properties

PropertyTypeMandatoryNotesGame Version
aRNumber(tick)

Ambient Red light.

Game default: 0.5

3.2
aGNumber(tick)

Ambient Green light.

Game default: 0.5

3.2
aBNumber(tick)

Ambient Blue light.

Game default: 0.5

3.2
dRNumber(tick)

Diffuse Red light.

Game default: 0.5

3.2
dGNumber(tick)

Diffuse Green light.

Game default: 0.5

3.2
dBNumber(tick)

Diffuse Blue light.

Game default: 0.5

3.2
sRNumber(tick)

Specular Red light.

Game default: 0.8

3.2
sGNumber(tick)

Specular Green light.

Game default: 0.8

3.2
sBNumber(tick)

Specular Blue light.

Game default: 0.8

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
width640
urlhttp://

...

www.

...

youtube.

...

com/

...

watch?

...

v=RjA_sC4bCAM
height480

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:

Image Added

Example

Code Block
themeRDark
languagejavascript
linenumberstrue
// 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
classbox
Availability
Status
colourRed
title3.2+

Requires:

  • Warzone 3.2 or above
Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

See also

Related articles: