SetSkyGradient: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 9: Line 9:
===Optional Arguments===  
===Optional Arguments===  
{{OptionalArg}}  
{{OptionalArg}}  
*'''argumentName2:''' description
*'''topRed:''' The ''red'' value of the upper part of the sky.
*'''argumentName3:''' description
*'''topGreen:''' The ''green'' value of the upper part of the sky.
*'''topBlue:''' The ''blue'' value of the upper part of the sky.
*'''bottomRed:''' The ''red'' value of the lower part of the sky.
*'''bottomGreen:''' The ''green'' value of the lower part of the sky.
*'''bottomBlue:''' The ''blue'' value of the lower part of the sky.


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns ''true'' if sky color was set correctly, ''false'' if the values go beyond 0 to 256, or are not numeric.


==Example==  
==Example==  
This example sets the sky to a hot pink color.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
setSkyGradient( 200, 0, 100, 200, 0, 100 )
blabhalbalhb --abababa
--This line does this...
mooo
</syntaxhighlight>
</syntaxhighlight>



Revision as of 16:56, 20 June 2007

This function changes the sky color to a 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. For more information on optional arguments, see optional arguments.

  • topRed: The red value of the upper part of the sky.
  • topGreen: The green value of the upper part of the sky.
  • topBlue: The blue value of the upper part of the sky.
  • bottomRed: The red value of the lower part of the sky.
  • bottomGreen: The green value of the lower part of the sky.
  • bottomBlue: The blue value of the lower part of the sky.

Returns

Returns true if sky color was set correctly, false if the values go beyond 0 to 256, or are not numeric.

Example

This example sets the sky to a hot pink color.

setSkyGradient( 200, 0, 100, 200, 0, 100 )

See Also