SetSkySaturation: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|Set the sky saturation for the client.}}
{{FuncDescription|Set the sky color saturation for the client.}}


{{FuncSyntax|SetSkySaturation(saturation)}}
{{FuncSyntax|SetSkySaturation(saturation)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|saturation|The saturation value in float between 0.0 to 4.0. The lower the more saturated.}}
{{FuncParam|saturation|The saturation value in float between 0.0 to 4.0.}}


{{FuncReturnValue|Returns '''true'''.}}
{{FuncReturnValue|Returns '''true'''.}}
Line 13: Line 13:
<syntaxhighlight lang="Lua">
<syntaxhighlight lang="Lua">
AddEvent("OnPlayerSpawn", function()
AddEvent("OnPlayerSpawn", function()
SetSkySaturation(4.0) -- Set the saturation to as low as possible
SetSkySaturation(0.0) -- Set the saturation to as low as possible, basically monochrome.
end)
end)
</syntaxhighlight>
</syntaxhighlight>

Revision as of 17:53, 29 August 2020

SetSkySaturation

Type: Function
Context: Client
Introduced: v1.0

Description

Set the sky color saturation for the client.

Syntax

SetSkySaturation(saturation)

Parameters

  • saturation
    The saturation value in float between 0.0 to 4.0.

Return Value

  • Returns true.

Example

AddEvent("OnPlayerSpawn", function()
	SetSkySaturation(0.0) -- Set the saturation to as low as possible, basically monochrome.
end)

See also

__EDIT_ME__