Jump to content

LlGetObjectMass

From OSgrid Wiki
Revision as of 22:49, 31 December 2017 by Osgridadmin (talk | contribs) (Created page with "==Function: float llGetObjectMass( key id );== Returns a float that is the mass of id <br> • key id – Avatar or object in the sim <br> <br> '''Caveats''' <br> • Re...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function: float llGetObjectMass( key id );

Returns a float that is the mass of id
• key id – Avatar or object in the sim

Caveats
• Returns zero if id is not found in the sim.
Examples

<source lang="lsl">

default {

   touch(integer n)
   {
       llSay(0, llDetectedName(0) + " your mass is " + (string)llGetObjectMass( llDetectedKey(0)) + " lindogram.");
   }

} //Anylyn Hax 15:02, 28 July 2007 (PDT) </source>


Notes
• Mass in SL is expressed as lindogram.
• Mass for avatars is relative to shape/size, and unaffected by attachments.

See Also
Functions
• llGetMass – Gets the current object mass.

Deep Notes
History
Prior to server code version 1.18.6.76747 avatar mass was fixed at 1.954922 lindogram. It is now relative to Avatar shape/size. Tests
• llGetObjectMass_Test