Combat
Build combat interactions with damage, health, and damage events.
Feature: Combat
What do you want to do?
llDamage(key target, float damage, integer damage_type)Generates a damage event delivering the specified amount of damage and damage_type to the targeted avatar or task in the same region.float llGetHealth(key id)Returns a float representing the current health of the avatar or object specified by id.list llDetectedDamage(integer number)Returns a list containing pending damage information for the event specified by number, including the current damage, the damage type, and the original damage delivered.llAdjustDamage(integer number, float new_damage)Modifies the amount of damage applied by the current on_damage event after it completes processing, specified by the damage event index number.Reference
9 topic entries
llAdjustDamage(integer number, float new_damage)functionModifies the amount of damage applied by the current
on_damageevent after it completes processing, specified by the damage event index number.llDamage(key target, float damage, integer damage_type)functionGenerates a damage event delivering the specified amount of damage and damage_type to the targeted avatar or task in the same region.
list llDetectedDamage(integer number)functionReturns a list containing pending damage information for the event specified by number, including the current damage, the damage type, and the original damage delivered.
float llGetHealth(key id)functionReturns a float representing the current health of the avatar or object specified by id.
key llRezObjectWithParams(string item, list options)functionInstantiates the named inventory object (defaulting to the rezzing prim's position unless
REZ_POSis specified) using the initial set of parameters specified in options. Returns the key of the rezzed object, or a blank key on failure.llSetDamage(float damage)functionSets the amount of damage delivered when this object hits an avatar. The object is immediately destroyed upon inflicting damage, and no collision event is triggered.
on_death()eventTriggered on all worn attachments when the wearing avatar's health reaches 0.
on_damage(integer num_detected)eventTriggered when damage has been inflicted on an avatar or task, but before it is applied or distributed. Collision detected functions (llDetected*),
llDetectedDamage, andllAdjustDamageare available. Passes num_detected, representing the number of pending damage events.final_damage(integer num_detected)eventTriggered after all
on_damageevents across all scripts have completed and damage is actively applied to the avatar or distributed among seated avatars. Collision detected functions (llDetected*) andllDetectedDamageare available.
No matching entries. Try a different term or filter.