# llAdjustDamage

*LSL function*

```lsl
void llAdjustDamage(integer number, float new_damage);
```

- `integer number`: Index of the damage event to modify.
- `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](/events/on_damage/) event after it has completed processing.

```lsl title="How to use" frame="terminal"
llAdjustDamage(0, 0.0);
```

## 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](/events/on_damage/) results in an error message being shouted to the debug channel.
- Requires the region to [allow damage adjustment](/functions/llGetEnv/) for the on_damage event to run
- Negative indexes are not supported.
- Indexes that are out of range will silently fail.

## See also

### Functions

- [llDetectedDamage](/functions/llDetectedDamage/)

### Events

- [on_damage](/events/on_damage/)

---

*Source: [LlAdjustDamage](https://wiki.secondlife.com/wiki/LlAdjustDamage) on the Second Life Wiki. Content from the Second Life Wiki article LlAdjustDamage (revision 1217226, 2024-09-07), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llAdjustDamage/
