speed: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| ofp |Game name=
| ofp


|1.00|Game version=
|1.00


|gr1= Object Manipulation |GROUP1=
|gr1= Object Manipulation


| 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=
| 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>


| '''speed''' object |SYNTAX=
| '''speed''' object


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


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


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


}}
}}

Revision as of 12:24, 18 January 2021

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:
Object Manipulation

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