speed: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| ofp |Game name=
| ofp |Game name=
Line 7: Line 6:


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


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


| '''speed''' object |SYNTAX=
| '''speed''' object |SYNTAX=
Line 17: Line 14:


| [[Number]] |RETURNVALUE=
| [[Number]] |RETURNVALUE=
____________________________________________________________________________________________
   
   
|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> |EXAMPLE1=
____________________________________________________________________________________________


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

Revision as of 04:54, 17 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

Notes

Bottom Section