OsGetHealth

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Add See Also)
Line 4: Line 4:
 
|delay=0
 
|delay=0
 
|function_syntax=float osGetHealth(key avatar)
 
|function_syntax=float osGetHealth(key avatar)
 +
|description=Gets an avatars health by key and returns the value as a float.
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">
 
default
 
default
Line 15: Line 16:
 
}
 
}
 
</source>
 
</source>
|description=Gets an avatars health by key and returns the value as a float.
 
 
See also [[OsCauseDamage]], [[OsCauseHealing]].
 
 
|additional_info=This function was added in 0.7.5-post-fixes
 
|additional_info=This function was added in 0.7.5-post-fixes
 
}}
 
}}
 +
'''See Also:'''
 +
* [[osGetHealth]]
 +
* [[osSetHealth]]
 +
* [[osGetHealRate]]
 +
* [[OsCauseDamage]]
 +
* [[OsCauseHealing]]

Revision as of 15:12, 3 December 2020

float osGetHealth(key avatar)
Gets an avatars health by key and returns the value as a float.
Threat Level None
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
default
{
    touch(integer t)
    {
        key agentID = llDetectedKey(0);
        osCauseDamage(agentID, 50);
        llSay(0, llKey2Name(agentID) + " has " + (string)osGetHealth(agentID) + "% health left.");
    }
}
Notes
This function was added in 0.7.5-post-fixes


See Also:

Personal tools
General
About This Wiki