Energy

From Second Life Wiki
Jump to navigation Jump to search

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.

  • What does "effectiveness" mean in this context?

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:

  • What's the energy content of an object?
    • It is a value from 0.0 to 1.0. It is not analogous to RL energy.
  • Is it possible to calculate the energy consumption of an action, e.g., running a script;
    • Yes, but it is involved.
  • When the energy is consumed how much time does it take to build it up again?
    • 200/mass units of energy per second.
  • During the energy build-up can we execute all actions needing less energy than the energy available?
    • Yes, but their effect will be diminished if the energy is less than 1.0.

Also

  • Does the script totally stop when it runs out of energy? Or pause?
    • Neither. The script is executed regardless of the energy level. Only the effect of those functions requiring energy is diminshed.
  • Are events that occur during such an "energy pause" queued up so when it it restarted they are then triggered?
    • No. There is no pause in the script, nor queued events.
  • At what rate does energy return (so one can add pauses in scripts for energy to return)?
    • 200/mass units of energy per second.
  • Does an object's energy exist per-prim, or per-object (link sets)?
    • Per object.
  • How does Energy get treated on Avatars?
    • Under normal circumstances, an avatar is not subject to energy concerns.
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)
  • How is energy used in scripts related to lag?
    • No direct relationship, to the extent that lag refers to things not happening in a timely manner. But energy constraints can make the movement of large physical objects erratic, which might be blamed on lag.


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

  • If Energy is on a scale of 0.0-1.0, and I use llShout which uses "10.0 Energy", where do the missing 9.0 energy units come from? Can you elaborate on just what this means?
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?
  • If you have 0.5 Energy, does this mean llShout would have a range of 50 meters instead of 100 meters?
    • No, distance is unaffected by energy.