velocity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
(35 intermediate revisions by 17 users not shown) | |||
Line 1: | Line 1: | ||
{{Command|Comments= | |||
____________________________________________________________________________________________ | |||
| ofpr |Game name= | |||
|1.80|Game version= | |||
|gr1= Object Manipulation |GROUP1= | |||
____________________________________________________________________________________________ | |||
| Return velocity (speed vector) of [[Object#Unit|Unit]] as an array with format [x, y, z]. | |||
{{Important|Units are in metres per second.}} |Description= | |||
____________________________________________________________________________________________ | |||
| [[velocity]] vehicleName |Syntax= | |||
[[ | |p1= vehicleName: [[Object]] |Parameter 1= | ||
| [[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= | |||
____________________________________________________________________________________________ | |||
| [[setVelocity]], [[velocityModelSpace]], [[setVelocityModelSpace]], [[setVelocityTransformation]], [[speed]] |See also= | |||
}} | |||
<h3 style="display:none">Notes</h3> | |||
<dl class="command_description"> | |||
<!-- Note Section BEGIN --> | |||
<!-- Note Section END --> | |||
</dl> | |||
<h3 style="display:none">Bottom Section</h3> | |||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.96|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Armed Assault|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] |
Revision as of 09:27, 23 September 2020
Description
- Description:
- Return velocity (speed vector) of Unit as an array with format [x, y, z].
- Groups:
- Object Manipulation
Syntax
Examples
- Example 1:
_vector = velocity jeep;
- Example 2:
if ((velocity _plane1 select 2) > 50) then { hint "Aircraft is climbing up too fast!"; };
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint: Resistance version 1.80
- Operation Flashpoint: Resistance: New Scripting Commands
- Operation Flashpoint: Resistance: Scripting Commands
- Command Group: Object Manipulation
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.99
- Scripting Commands Armed Assault
- Scripting Commands Arma 2
- Scripting Commands Take On Helicopters
- Scripting Commands Arma 3