SetCameraGoggleEffect: Difference between revisions
Jump to navigation
Jump to search
OpenIDUser55 (talk | contribs) No edit summary |
(OOP) |
||
Line 7: | Line 7: | ||
bool setCameraGoggleEffect ( string goggleEffect ) | bool setCameraGoggleEffect ( string goggleEffect ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[camera]]:setGoggleEffect|GoggleEffect|getCameraGoggleEffect]] | |||
===Required Arguments=== | ===Required Arguments=== | ||
*'''goggleEffect''': | *'''goggleEffect''': the goggle effect you wish to set | ||
{{Camera goggle modes}} | {{Camera goggle modes}} | ||
===Returns=== | ===Returns=== | ||
* ''true'' if the effect was set correctly. | |||
* ''false'' otherwise. | |||
==Example== | ==Example== |
Revision as of 21:18, 5 October 2014
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 )
{{OOP||camera:setGoggleEffect|GoggleEffect|getCameraGoggleEffect]]
Required Arguments
- goggleEffect: the goggle effect you wish to set
- normal: No camera goggle effect
- nightvision: Nightvision camera
- thermalvision: Infrared camera
Returns
- true if the effect was set correctly.
- false otherwise.
Example
function nightvision() if (getCameraGoggleEffect() == "normal") then setCameraGoggleEffect("nightvision") elseif (getCameraGoggleEffect() == "nightvision") then setCameraGoggleEffect("normal") end end addCommandHandler("nightvision", nightvision)
See Also
- getCamera
- getCameraClip
- getCameraFieldOfView
- getCameraGoggleEffect
- getCameraViewMode
- setCameraClip
- setCameraFieldOfView
- setCameraGoggleEffect
- setCameraViewMode
- Shared
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget