Difference between revisions of "LlAdjustDamage"

From Second Life Wiki
Jump to navigation Jump to search
(Caveat on damage adjustment)
 
Line 10: Line 10:
|caveats=
|caveats=
* Calling this function from any event handler other than [[on_damage]] results in an error message being shouted to the debug channel.  
* Calling this function from any event handler other than [[on_damage]] results in an error message being shouted to the debug channel.  
** Requires the region to [[llGetEnv|allow damage adjustment]] for the on_damage event to run
* Negative indexes are not supported.  
* Negative indexes are not supported.  
* Indexes that are out of range will silently fail.
* Indexes that are out of range will silently fail.

Latest revision as of 09:46, 7 September 2024

Summary

Function: llAdjustDamage( integer number, float new_damage );
0.0 Forced Delay
10.0 Energy

The llAdjustDamage modifies the amount of damage that will be applied by the current on_damage event after it has completed processing.

• integer number The index of the damage event to be modified.
• float new_damage A new damage value to be applied or distributed after on_damage processing.

Specification

This function allows a script to modify incoming damage before it is applied to an avatar or distributed by a task.

Caveats

  • Calling this function from any event handler other than on_damage results in an error message being shouted to the debug channel.
  • Negative indexes are not supported.
  • Indexes that are out of range will silently fail.

Examples

See Also

Events

•  on_damage

Functions

•  llDetectedDamage

Deep Notes

Signature

function void llAdjustDamage( integer number, float new_damage );