Squirrel/Client/Functions/Camera/ShakeCamera
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
|||
Line 1: | Line 1: | ||
{{Squirrel/Title|ShakeCamera}} | {{Squirrel/Title|ShakeCamera}} | ||
− | This function shakes the camera of the | + | This function shakes the camera of the client. |
== Syntax == | == Syntax == | ||
− | <code>bool ShakeCamera( | + | <code>bool ShakeCamera( int intensity )</code> |
== Arguments == | == Arguments == | ||
Line 12: | Line 12: | ||
== Example == | == Example == | ||
− | This will shake the players camera when they type /shake | + | This will shake the players camera when they type '/shake'. |
<code lang="squirrel"> | <code lang="squirrel"> | ||
Line 19: | Line 19: | ||
if ( szCommand == "shake" ) | if ( szCommand == "shake" ) | ||
{ | { | ||
− | ShakeCamera( | + | ShakeCamera( 250 ); |
} | } | ||
Line 29: | Line 29: | ||
The event [[Squirrel/Client/Events/Player/onClientCommand|onClientCommand]] was used in this example. More info about this in the corresponding page. | The event [[Squirrel/Client/Events/Player/onClientCommand|onClientCommand]] was used in this example. More info about this in the corresponding page. | ||
− | |||
== Related Functions == | == Related Functions == | ||
{{Squirrel/Client/Functions/Camera}} | {{Squirrel/Client/Functions/Camera}} |
Latest revision as of 19:50, 28 October 2010
This function shakes the camera of the client.
[edit] Syntax
bool ShakeCamera( int intensity )
[edit] Arguments
- intensity - The intensity of the shaking
[edit] Example
This will shake the players camera when they type '/shake'.
function onClientCommand( szCommand, szText ) { if ( szCommand == "shake" ) { ShakeCamera( 250 ); } return 1; }
[edit] Notes
The event onClientCommand was used in this example. More info about this in the corresponding page.
[edit] Related Functions
- FadeCamera
- RestoreCamera
- ShakeCamera
- SetCameraMatrix