SetGrainMultiplier

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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