Skip to content

setSkyGradient

Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function changes the sky color to a two-color gradient.

Syntax

bool setSkyGradient ( [ ​int topRed = 0, ​int topGreen = 0, ​int topBlue = 0, ​int bottomRed = 0, ​int bottomGreen = 0, ​int bottomBlue = 0 ] )
Optional arguments

Note: when using optional arguments, you might need to supply all arguments before the one you wish to use.

  • topRed (default: 0): The red value of the upper part of the sky, from 0 to 255.
  • topGreen (default: 0): The green value of the upper part of the sky, from 0 to 255.
  • topBlue (default: 0): The blue value of the upper part of the sky, from 0 to 255.
  • bottomRed (default: 0): The red value of the lower part of the sky, from 0 to 255.
  • bottomGreen (default: 0): The green value of the lower part of the sky, from 0 to 255.
  • bottomBlue (default: 0): The blue value of the lower part of the sky, from 0 to 255.

Returns

Returns true if sky color was set correctly, false if invalid values were passed.

  • bool: value

Code Examples

shared
function ClientStarted ()
setSkyGradient( 200, 0, 100, 150, 0, 70 )
end
addEventHandler( "onClientResourceStart", resourceRoot, ClientStarted )

See Also

World Functions