LlGetHealth: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Rider Linden (talk | contribs)
Created page with "{{LSL_Function |func_id=|func_sleep=0.0|func_energy=10.0 |func=llGetHealth|return_type=float |func_desc=Returns the current health of an avatar. |return_text |spec={{LSL Warni..."
 
Nexii Malthus (talk | contribs)
Discrepancy noticed, also returns health values of avs in nearby regions
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
|func_id=|func_sleep=0.0|func_energy=10.0
|func_id=|func_sleep=0.0|func_energy=10.0
|func=llGetHealth|return_type=float
|func=llGetHealth|return_type=float
|func_desc=Returns the current health of an avatar.
|p1_type=key|p1_subtype=handle|p1_name=id|p1_desc=The ID of an agent or object in the region.
|func_desc=Returns the current health of an avatar or object in the region.
|return_text
|return_text
|spec={{LSL Warnings/Combat2}}
|spec=Returns the current health value for an avatar or object in the region.
Returns the current health value for an avatar from a script running in an attachment.  
|caveats=
|caveats=
*If this function is called from a script that is not attached to an avatar it returns 0.0
* Seems to be able to return current health of avatars in neighbouring regions as well
|examples
|also_constants=
|helpers
{{LSL ConstRow|PRIM_HEALTH}}
|also_functions
{{LSL ConstRow|OBJECT_HEALTH}}
|also
|also_functions=
|notes
{{LSL DefineRow||[[llGetObjectDetails]]|}}
{{LSL DefineRow||[[LlSetPrimitiveParams]]|}}
{{LSL DefineRow||[[LlSetLinkPrimitiveParams]]|}}
{{LSL DefineRow||[[LlGetPrimitiveParams]]|}}
{{LSL DefineRow||[[LlGetLinkPrimitiveParams]]|}}
|cat1=Combat2
|cat1=Combat2
|cat2=Script
|cat2=Script
|cat3
|cat4
}}
}}

Latest revision as of 14:48, 12 March 2025

Summary

Function: float llGetHealth( key id );
0.0 Forced Delay
10.0 Energy

Returns the current health of an avatar or object in the region.
Returns a float

• key id The ID of an agent or object in the region.

Specification

Returns the current health value for an avatar or object in the region.

Caveats

  • Seems to be able to return current health of avatars in neighbouring regions as well

Examples

Deep Notes

Signature

function float llGetHealth( key id );