Energy

When certain dynamic functions are called from a script running on a physical object, the object loses energy. As the object loses energy, the effectiveness of dynamic functions on the object decreases. Energy is mostly relevant for large physical objects. For objects the size of an avatar or smaller, energy effects can generally be ignored.

Non-physical objects need not worry about energy, as main way energy is reduced is through llPushObject, llApplyImpulse, and llSetForce. Even very massive non-physical objects can run almost any script just as well as one 100x smaller.

Please describe how it works! Answer at least the following questions:

Also

This isn't precisely accurate... attachments on the avatar seem to have the same energy limitations as unattached objects -- Argent Stonecutter 10:13, 4 August 2007 (PDT)


More (from Argent Stonecutter 07:18, 10 May 2007 (PDT))

I believe the llGetEnergy returns the quantity of energy available divided by the total possible for the object. Since it is known that small and large objects regenerate energy differently this is a fair assumption. -- Strife Onizuka 20:29, 13 April 2008 (PDT)
Hypothesis: if I have an object with a mass of 1.0 kg it can call llShout 20 times a second, and if it calls llShout 40 times in a second this will leave it with 0.5 Energy. Is this correct?
No. The energy value of 10.0 in the header for each function in this Wiki seems to be a constant from a template and doesn't mean anything. Most lsl functions neither affect, nor are affected by, energy. -- Omei Turnbull 11:10, 13 April 2008 (PDT)
If it does have meaning then energy is regenerated faster then 10.0 (internal) units per increment of time as to not register a value. The energy values were extracted from the function setup code and those values are used to modify the script's energy register when a built-in function is called. -- Strife Onizuka 20:29, 13 April 2008 (PDT)

AnnMarie Otoole asks: Does energy then serve any useful purpose? It appears it may only have a nebulous undesired effect on large physical vehicles and is obsolete. I would rather see an efficiency value listed for every function that indicates compiled efficiency. For example, how many llGetOwner()s do you have to do before it would have been more economical to declare a variable and use the variable name?