SetGrainMultiplier: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{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.}} ==Syntax== <syntaxhighlight lang="lua"> bool setGrainMultiplier ( string modifierName, float multiplier ) </syntaxhighlight> ===Required Arguments=== *'''modifierName :''' The modifier name to u...")
 
No edit summary
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 a 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).

Revision as of 15:51, 25 July 2023

ADDED/UPDATED IN VERSION 1.6.0 r21894:
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 a 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