velocity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Velocity used in example would have errored, as it returns an array and not a number) |
||
Line 26: | Line 26: | ||
'''Example:''' | '''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)] |
Revision as of 20:52, 18 July 2006
velocity vehicle
Operand types:
vehicle: Object
Type of returned value:
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)]