llAdjustDamage
function
Function syntax
llAdjustDamage(integer number,// Index of the damage event to modify.float new_damage// New damage value to be applied or distributed afteron_damageprocessing.
);- Energy
- 10
Modifies the amount of damage applied by the current on_damage event after it completes processing, specified by the damage event index number.
The llAdjustDamage modifies the amount of damage that will be applied by the current on_damage event after it has completed processing.
llAdjustDamage(0, 0.0);Specification
Section titled “Specification”This function allows a script to modify incoming damage before it is applied to an avatar or distributed by a task.
Caveats
Section titled “Caveats”- Calling this function from any event handler other than
on_damageresults in an error message being shouted to the debug channel. - Requires the region to allow damage adjustment for the on_damage event to run
- Negative indexes are not supported.
- Indexes that are out of range will silently fail.
See also
Section titled “See also”Functions
Section titled “Functions”Events
Section titled “Events”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.