SetCameraGoggleEffect: Difference between revisions
Jump to navigation
Jump to search
m (Much faster) |
(Add noiseEnabled) |
||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool setCameraGoggleEffect ( string goggleEffect ) | bool setCameraGoggleEffect ( string goggleEffect [, bool noiseEnabled = true ] ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||Camera.setGoggleEffect|goggleEffect|getCameraGoggleEffect}} | {{OOP||Camera.setGoggleEffect|goggleEffect|getCameraGoggleEffect}} | ||
Line 11: | Line 11: | ||
*'''goggleEffect''': the goggle effect you wish to set | *'''goggleEffect''': the goggle effect you wish to set | ||
{{Camera goggle modes}} | {{Camera goggle modes}} | ||
{{New feature/item|3.0155|1.5.5|14000| | |||
*'''noiseEffect''': whether or not there should be a fuzzy noise effect | |||
}} | |||
===Returns=== | ===Returns=== | ||
* ''true'' if the effect was set correctly. | * ''true'' if the effect was set correctly. |
Revision as of 00:28, 16 August 2018
This function allows you to set the camera's current goggle effect. This means you can activate nightvision or infrared effects by script
Syntax
bool setCameraGoggleEffect ( string goggleEffect [, bool noiseEnabled = true ] )
OOP Syntax Help! I don't understand this!
- Method: Camera.setGoggleEffect(...)
- Variable: .goggleEffect
- Counterpart: getCameraGoggleEffect
Required Arguments
- goggleEffect: the goggle effect you wish to set
- normal: No camera goggle effect
- nightvision: Nightvision camera
- thermalvision: Infrared camera
- noiseEffect: whether or not there should be a fuzzy noise effect
Returns
- true if the effect was set correctly.
- false otherwise.
Example
function nightvision() local effect = (getCameraGoggleEffect() == "normal" and "nightvision") or "normal" setCameraGoggleEffect(effect) end addCommandHandler("nightvision", nightvision)
See Also
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraViewMode
- Shared
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget