From Second Life Wiki
Revision as of 14:58, 9 May 2010 by Fred Gandt (Talk | contribs)

Jump to: navigation, search


Function: llSetDamage( float damage );

Sets the amount of damage that will be done when this object hits an avatar.

• float damage range: 0.0 (no damage) ~ 100.0 (instant kill)


For an avatar to take damage when the object collides with an avatar...

  • The object must not be phantom and
  • The avatar must be on the land where "Safe (no damage)" is disabled.
  • The object needs only be partially over damage enabled land. Its pos need not be.

When these preconditions are met, the avatar receives the damage, and the object will die without calling the collision events.


  • If damage is 100.0 or greater, the object will instantly kill even a fully healthy avatar.
  • If damage is zero or less, no damage will be inflicted and the object will not die and the collision or land_collision events will be queued.
  • If the object is not partially over damage enabled land when it collides, the object will not die and the collision or land_collision events will be queued.
  • If a damage enabled object hits a physics enabled object that an avatar is sitting on, the avatar receives the damage just the same as they would if they had been hit directly.
All Issues ~ Search JIRA for related Bugs


<lsl>//Simple autokiller bullet: //When it rezzed it scans for the closest person, //Moves to their location and kills them. (Because //It collides with them) default {

   on_rez(integer i) {
       llSensor("", "", AGENT, PI, 96.0);
   timer() { llDie(); }
   sensor(integer num) {
       llSetStatus(STATUS_PHYSICS, TRUE);
       llMoveToTarget(llDetectedPos(0), 1.0);

Deep Notes

Search JIRA for related Issues


function void llSetDamage( float damage );