SetGrainMultiplier: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|3.0161|1.6.0|21894|This function is used to adjust an intensity of the grain effect in different situations. It separately modulates an intensity of effect for infrared goggles, night vision goggles, rain and screen overlay.}}
{{New feature/item|3.0161|1.6.0|21902|This function is used to adjust an intensity of the grain effect in different situations. It separately modulates an intensity of effect for infrared goggles, night vision goggles, rain and screen overlay.}}


==Syntax==  
==Syntax==  
Line 14: Line 14:
**'''night:''' The intersity of a grain effect for night vision goggles.
**'''night:''' The intersity of a grain effect for night vision goggles.
**'''rain :''' The intersity of a grain effect for rain.
**'''rain :''' The intersity of a grain effect for rain.
**'''overlay :''' The intersity of a grain effect for a screen overlay(see [[setGrainLevel]]).
**'''overlay :''' The intersity of a grain effect for the screen overlay(see [[setGrainLevel]]).
**'''all :''' Can be used to set all the modifiers above at once.
**'''all :''' Can be used to set all the modifiers above at once.
*'''multiplier :''' The multiplier (0-1).
*'''multiplier :''' The multiplier (0-1).

Latest revision as of 01:46, 26 July 2023

ADDED/UPDATED IN VERSION 1.6.0 r21902:
This function is used to adjust an intensity of the grain effect in different situations. It separately modulates an intensity of effect for infrared goggles, night vision goggles, rain and screen overlay.

Syntax

bool setGrainMultiplier ( string modifierName, float multiplier )

Required Arguments

  • modifierName : The modifier name to use which can be one of:
    • master: The overall intersity that modulates the other ones.
    • infrared: The intersity of a grain effect for infrared goggles.
    • night: The intersity of a grain effect for night vision goggles.
    • rain : The intersity of a grain effect for rain.
    • overlay : The intersity of a grain effect for the screen overlay(see setGrainLevel).
    • all : Can be used to set all the modifiers above at once.
  • multiplier : The multiplier (0-1).

Returns

Returns true if the grain multiplier was set, false otherwise.

Example

This example disables a grain effect for the rain.

addCommandHandler( "disable_rain_grain", function()
	setGrainMultiplier( "rain", 0 )
end )

See Also