Difference between revisions of "velocity"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
m (version update 1.8 → 1.80)
 
(27 intermediate revisions by 16 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|VELOCITY]]
+
{{Command|Comments=
[[Category:Scripting Commands OFP 1.97|VELOCITY]]
+
____________________________________________________________________________________________
[[Category:Scripting Commands ArmA|VELOCITY]]
 
  
 +
| ofpr |Game name=
  
<h2 style="color:#000066">'''velocity ''vehicle'''''</h2>
+
|1.80|Game version=
 +
____________________________________________________________________________________________
  
 +
| Return velocity (speed vector) of [[Object#Unit|Unit]] as an array with format [x, y, z].
 +
{{Important|Units are in metres per second.}} |Description=
 +
____________________________________________________________________________________________
  
'''Operand types:'''
+
| [[velocity]] vehicleName |Syntax=
  
'''vehicle:''' [[Object]]
+
|p1= vehicleName: [[Object]] |Parameter 1=
  
'''Type of returned value:'''
+
| [[Array]] |Return value=
 +
____________________________________________________________________________________________
 +
 
 +
|x1= <code>_vector = [[velocity]] jeep;</code> |Example 1=
 +
|x2= <code>[[if]] (([[velocity]] _plane1 [[select]] 2) > 50) [[then]] { [[hint]] "Aircraft is climbing up too fast!"; };</code> |Example 2=
 +
____________________________________________________________________________________________
  
[[Array]]
+
[[setVelocity]], [[velocityModelSpace]], [[setVelocityModelSpace]], [[setVelocityTransformation]], [[speed]] |See also=
 +
}}
  
'''Compatibility:'''
+
<h3 style="display:none">Notes</h3>
 +
<dl class="command_description">
 +
<!-- Note Section BEGIN -->
  
Added in version '''1.80'''
+
<!-- Note Section END -->
 +
</dl>
  
'''Description:'''
+
<h3 style="display:none">Bottom Section</h3>
  
Return velocity (speed vector) of vehicle as array '''[x, z, y]'''.
+
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
+
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]]
 
+
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
'''Example:'''
+
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
 
+
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
? '''velocity''' carOne > 50 : [[hint]] "Slow down, you are exceeding the speed limit."
+
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
 +
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 09:06, 1 June 2018

Introduced with Operation Flashpoint: Resistance version1.80
  

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint: Resistance
Version:
1.80

Description

Description:
Return velocity (speed vector) of Unit as an array with format [x, y, z].
Units are in metres per second.

Syntax

Syntax:
velocity vehicleName
Parameters:
vehicleName: Object
Return Value:
Array

Examples

Example 1:
_vector = velocity jeep;
Example 2:
if ((velocity _plane1 select 2) > 50) then { hint "Aircraft is climbing up too fast!"; };

Additional Information

Multiplayer:
-
See also:
setVelocityvelocityModelSpacesetVelocityModelSpacesetVelocityTransformationspeed

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section