getMass: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
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|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects? in MP|M...)
(updated SeeAlso)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command
{{RV|type=command
 
|game1= arma3
|version1= 1.12


| arma3
|1.12
|arg= global
|arg= global


|gr1= Object Manipulation
|gr1= Object Manipulation


| Returns mass of a PhysX object.
|descr= Returns mass of a PhysX object.


| '''getMass''' object
|s1= [[getMass]] object


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


| [[Number]]
|r1= [[Number]]
 
 
|x1= <code>_mass = [[getMass]] _myCar</code>
 


| [[getCenterOfMass]], [[setCenterOfMass]], [[setMass]], [[load]], [[weightRTD]]
|x1= <sqf>_mass = getMass _myCar;</sqf>


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


<dl class="command_description">


{{GameCategory|arma3|New Scripting Commands}}
<dt></dt>
{{GameCategory|arma3|Scripting Commands}}
<dd class="notedate">Posted on 2015-04-15 - 20:15 (UTC)</dd>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on April 15, 2015 - 20:15 (UTC)</dd>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dt class="note">[[User:Pierre MGI|Pierre MGI]]</dt>
<dd class="note">
<dd class="note">
Line 37: Line 30:
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.
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>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 14: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.