Squirrel/Client/Functions/Camera/ShakeCamera

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 12: Line 12:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
+
This will shake the players camera when they type /shake
Explanation for the example
+
  
 
<code lang="squirrel">
 
<code lang="squirrel">
-- Todo
+
function onClientCommand( szCommand, szText )
 +
{
 +
if ( szCommand == "shake" )
 +
{
 +
ShakeCamera( 5.00 );
 +
}
 +
 +
return 1;
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- List of used functions and other notes here.  
+
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}}

Revision as of 17:59, 18 October 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function shakes the camera of the given player.

Syntax

  1. bool ShakeCamera( float intensity )

Arguments

  • intensity - The intensity of the shaking

Example

This will shake the players camera when they type /shake

  1.  
  2. function onClientCommand( szCommand, szText )
  3. {
  4. if ( szCommand == "shake" )
  5. {
  6. ShakeCamera( 5.00 );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The event onClientCommand was used in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox