Difference between revisions of "LlGetObjectMass"

From Second Life Wiki
Jump to navigation Jump to search
(added note about sitting avatars)
m
Line 13: Line 13:
|constants
|constants
|examples=
|examples=
<lsl>default
<source lang="lsl2">default
{
{
     touch(integer n)
     touch(integer n)
Line 20: Line 20:
     }
     }
}
}
//Anylyn Hax 15:02, 28 July 2007 (PDT)</lsl>
//Anylyn Hax 15:02, 28 July 2007 (PDT)</source>
|helpers
|helpers
|also_functions=
|also_functions=

Revision as of 02:19, 22 January 2015

Summary

Function: float llGetObjectMass( key id );

Returns a float that is the mass of id

• key id group, avatar or object UUID that is in the same region

Caveats

  • Returns zero if id is not found in the region.
  • id can be any prim in the object.
All Issues ~ Search JIRA for related Bugs

Examples

default
{
    touch(integer n)
    {
        llSay(0, llDetectedName(0) + " your mass is " + (string)llGetObjectMass( llDetectedKey(0)) + " lindogram.");
    }
}
//Anylyn Hax 15:02, 28 July 2007 (PDT)

Notes

  • Mass in SL is expressed as lindogram.
  • Mass for avatars is relative to shape/size, and unaffected by attachments.
  • Sitting avatars add their mass to the object.

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.
Search JIRA for related Issues

Tests

•  llGetObjectMass_Test

Signature

function float llGetObjectMass( key id );