getMass: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also, example)
(updated SeeAlso)
 
(35 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.12


|1.12|= Game version
|arg= global
____________________________________________________________________________________________


| Returns mass of a PhysX object. |= Description
|gr1= Object Manipulation
____________________________________________________________________________________________


| '''getMass''' object |= Syntax
|descr= Returns mass of a PhysX object.


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


| [[Number]] |= RETURNVALUE
|p1= object: [[Object]]


|r1= [[Number]]


|x1= <code>_mass = getMass _myCar</code>|= EXAMPLE1
|x1= <sqf>_mass = getMass _myCar;</sqf>


____________________________________________________________________________________________
|seealso= [[getCenterOfMass]] [[setCenterOfMass]] [[setMass]] [[load]] [[weightRTD]] [[getModelInfo]]
 
}}
| [[getCenterOfMass]], [[setCenterOfMass]], [[setMass]], |= SEEALSO


|  |= MPBEHAVIOUR
<dl class="command_description">
____________________________________________________________________________________________
}}


<h3 style='display:none'>Notes</h3>
<dt></dt>
<dl class='command_description'>
<dd class="notedate">Posted on 2015-04-15 - 20:15 (UTC)</dd>
<!-- Note Section BEGIN -->
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dd class="note">
This function will return 0 for infantry AI units. That means a manned Blufor Hunter has the same mass than an empty one (8306.63).
Crates return their initial mass, but if you empty them or load items, magazines and weapons, the mass remains the same. In fact, none of these (non-physx) objects has a mass.
</dd>


<!-- Note Section END -->
</dl>
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 15:36, 16 January 2024

Hover & click on the images for description

Description

Description:
Returns mass of a PhysX object.
Groups:
Object Manipulation

Syntax

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

Examples

Example 1:
_mass = getMass _myCar;

Additional Information

See also:
getCenterOfMass setCenterOfMass setMass load weightRTD getModelInfo

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
Posted on 2015-04-15 - 20:15 (UTC)
Pierre MGI
This function will return 0 for infantry AI units. That means a manned Blufor Hunter has the same mass than an empty one (8306.63). Crates return their initial mass, but if you empty them or load items, magazines and weapons, the mass remains the same. In fact, none of these (non-physx) objects has a mass.