speed: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (template:command argument fix)
(15 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|SPEED]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.97|SPEED]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|SPEED]]
[[Category:Scripting Commands ArmA|SPEED]]


| ofp |= Game name


<h2 style="color:#000066">'''speed ''obj'''''</h2>
|1.00|= Game version
____________________________________________________________________________________________


| Object speed (in km/h). Returns relative speed of given object along Y axis. An equivalent to:<br><br><tt>3.6 * ([[velocityModelSpace]] _obj [[select]] 1)</tt> |DESCRIPTION=
____________________________________________________________________________________________


'''Operand types:'''
| '''speed''' object |SYNTAX=


'''obj:''' [[Object]]
|p1= object: [[Object]] |PARAMETER1=


'''Type of returned value:'''
| [[Number]] |RETURNVALUE=
____________________________________________________________________________________________
 
|x1= <code>[[if]] ([[speed]] _truck1 >= 100) [[then]] {[[hint]] "You're going too fast!"};</code> |EXAMPLE1=
____________________________________________________________________________________________


[[Number]]
| [[velocity]], [[setVelocity]], [[velocityModelSpace]], [[setVelocityModelSpace]], [[setVelocityTransformation]], [[limitSpeed]] |SEEALSO=


'''Description:'''
}}


'''Object speed''' (in km/h).
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
</dl>


'''Example:'''
<h3 style="display:none">Bottom Section</h3>
 
[[Category:Scripting Commands|SPEED]]
? ('''speed''' truck1) >= 100 : [[hint]] "You're going too fast!"
[[Category:Scripting Commands OFP 1.99|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands OFP 1.96|SPEED]]
[[Category:Scripting Commands OFP 1.46|SPEED]]
[[Category:Scripting Commands ArmA|SPEED]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 15:49, 7 April 2019

Hover & click on the images for description

Description

Description:
Object speed (in km/h). Returns relative speed of given object along Y axis. An equivalent to:

3.6 * (velocityModelSpace _obj select 1)
Groups:
Uncategorised

Syntax

Syntax:
speed object
Parameters:
object: Object
Return Value:
Number

Examples

Example 1:
if (speed _truck1 >= 100) then {hint "You're going too fast!"};

Additional Information

See also:
velocitysetVelocityvelocityModelSpacesetVelocityModelSpacesetVelocityTransformationlimitSpeed

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