llSetBuoyancy

From Second Life Wiki
Revision as of 07:18, 20 May 2007 by DuraS Torok (talk | contribs)
Jump to navigation Jump to search

Summary

Function: llSetBuoyancy( float buoyancy );
0.0 Forced Delay
10.0 Energy

Sets the buoyancy of the task or object.

• float buoyancy

if (buoyancy == 0.0) disables
if (buoyancy < 1.0) sinks
if (buoyancy == 1.0) floats
If (buoyancy > 1.0) rises

Caveats

  • Wind can cause the prim to drift.
  • Unlike some other characteristics, this is cancelled if the script that set buoyancy is removed from the prim.

Examples

Makes an object float up slowly (e.g. a red balloon)
default
{
    state_entry()
    {
        llSetStatus(STATUS_PHYSICS, TRUE);
        llSetBuoyancy(1.05);
    }
}

Deep Notes

Signature

function void llSetBuoyancy( float buoyancy );