Skip to content
lsl.devlsl.devLSL Dev

llGetMassMKS

function
Function syntax
float llGetMassMKS();
Returns
float
Energy
10

MKS as used in the name of this function is likely a reference to the MKS system of units (Meter, Kilogram, Second), which form the base of SI units (with some minor differences).

Returns a float that is the mass (in Kilograms) of object that script is attached to. Functionally identical to llGetMass except for the unit used in the return value.

How to use
float result = llGetMassMKS();
  • Attachments do not effect an avatar’s mass, only certain Appearance settings.
  • Avatar mass is reported to either be unexpectedly low (when measured using llGetMass) or unexpectedly high (when measured using llGetMassMKS). This is likely due to the weight being calculated based on a fixed value, with a modifier for height. The fixed value being used is incorrect, likely due to an incorrect density value being used.
Example 1
//Reports an object's mass in Lindograms and Kilograms.
default
{
touch_start()
{
llSay(0,"My weight in Lindograms: " + (string)llGetMass() + "\nMy weight in Kilograms: " + (string)llGetMassMKS());
}
}
  • the Kilogram value seems to be the Lindogram value multiplied by 100.

Date of Release 23/09/2011

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlGetMassMKS, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.