velocity

From Bohemia Interactive Community
Revision as of 20: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


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)]