velocity

From Bohemia Interactive Community
Revision as of 21:52, 18 July 2006 by korax (talk | contribs) (Velocity used in example would have errored, as it returns an array and not a number)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


velocity vehicle


Operand types:

vehicle: Object

Type of returned value:

Array

Compatibility:

Added in version 1.80

Description:

Return velocity (speed vector) of vehicle as array [x, z, y].


Example:

vector = velocity jeep

Advanced:

_vehicle setVelocity [(velocity _vehicle select 0)+(sin _dir*_speed),(velocity _vehicle select 1)+(cos _dir*_speed),(velocity _vehicle select 2)]