Skip to content
lsl.devlsl.devLSL Dev

llAdjustDamage

function
Function syntax
llAdjustDamage(
  1. integer number,// Index of the damage event to modify.
  2. float new_damage// New damage value to be applied or distributed after on_damage processing.
);
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.

How to use
llAdjustDamage(0, 0.0);

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

  • 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 allow damage adjustment for the on_damage event to run
  • Negative indexes are not supported.
  • Indexes that are out of range will silently fail.
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.

From the Second Life Wiki

Community documentation adapted from LlAdjustDamage, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.