SetHeatHaze: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Added heat haze template)
 
(3 intermediate revisions by 2 users not shown)
Line 10: Line 10:
===Optional Arguments===  
===Optional Arguments===  
{{OptionalArg}}  
{{OptionalArg}}  
*'''intensity:''' The intensity of the effect, from 0 to 255.
{{HeatHazeValues}}
*'''randomShift:''' Sets a random jitter, from 0 to 255.
*'''speedMin:''' The slowest effect speed, from 0 to 1000.
*'''speedMax:''' The fastest effect speed, from 0 to 1000.
*'''scanSizeX:''' The X size in pixels of the chunk grabbed from the screen, from -1000 to 1000.
*'''scanSizeY:''' The Y size in pixels of the chunk grabbed from the screen, from -1000 to 1000.
*'''renderSizeX:''' The X size in pixels the chunk will be when rendered back to the screen, from 0 to 1000.
*'''renderSizeY:''' The Y size in pixels the chunk will be when rendered back to the screen, from 0 to 1000.
*'''bShowInside:''' Set to ''true'' to enable the heat haze effect when inside a building.


===Returns===
===Returns===
Line 24: Line 16:


==Example==  
==Example==  
This example turns the heat haze effect off.
'''Example 1:''' This example turns the heat haze effect off:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
setHeatHaze ( 0 )
setHeatHaze ( 0 )
</syntaxhighlight>
</syntaxhighlight>


This example will show some kind of electric world effect or like a compression with lost of the images ^^.
'''Example 2:''' This example will have an interesting effect:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
setHeatHaze ( 50, 20, 0, 500, 200, 100, 50, 20, true )
setHeatHaze ( 50, 20, 0, 500, 200, 100, 50, 20, true )

Latest revision as of 07:18, 17 July 2011

This function changes the heat haze effect.

Syntax

bool setHeatHaze ( int intensity, [ int randomShift = 0, int speedMin = 12, int speedMax = 18, int scanSizeX = 75, int scanSizeY = 80, int renderSizeX = 80, int renderSizeY = 85, bool bShowInside = false ] )

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.

  • intensity: The intensity of the effect, from 0 to 255.
  • randomShift: Sets a random jitter, from 0 to 255.
  • speedMin: The slowest effect speed, from 0 to 1000.
  • speedMax: The fastest effect speed, from 0 to 1000.
  • scanSizeX: The X size in pixels of the chunk grabbed from the screen, from -1000 to 1000.
  • scanSizeY: The Y size in pixels of the chunk grabbed from the screen, from -1000 to 1000.
  • renderSizeX: The X size in pixels the chunk will be when rendered back to the screen, from 0 to 1000.
  • renderSizeY: The Y size in pixels the chunk will be when rendered back to the screen, from 0 to 1000.
  • bShowInside: Set to true to enable the heat haze effect when inside a building.

Returns

Returns true if the heat haze effect was set correctly, false if invalid values were passed.

Example

Example 1: This example turns the heat haze effect off:

setHeatHaze ( 0 )

Example 2: This example will have an interesting effect:

setHeatHaze ( 50, 20, 0, 500, 200, 100, 50, 20, true )

See Also