Squirrel/Server/Functions/Vehicles/Velocity

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|Vehicle.Velocity}} This ''Vehicle'' class member returns the velocity of the given vehicle. == Syntax == <code>Vector Vehicle.Velocity</code> == Arguments == …')
 
m (Whoops)
 
Line 29: Line 29:
 
== Related Functions ==
 
== Related Functions ==
  
{{Squirrel/Client/Functions/Vehicles}}
+
{{Squirrel/Server/Functions/Vehicles}}

Latest revision as of 03:47, 24 September 2011

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

This Vehicle class member returns the velocity of the given vehicle.

[edit] Syntax

  1. Vector Vehicle.Velocity

[edit] Arguments

  • Velocity - This is the changed velocity for the vehicle as a Vector

[edit] Example

  1.  
  2. function getVelocityX( )
  3. {
  4. local vehicle = FindVehicle( 1 );
  5. local velocity = veh.Velocity;
  6. local velocityX = velocity.x;
  7. return velocityX;
  8. }
  9.  

This code will return the velocity of vehicle 1 along the X axis.

[edit] Notes

The function FindVehicle was used in this example. More information is available on the corresponding page.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox