OsGetHealth

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
m (Added permissions and delay information)
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
 
|threat_level=None
 
|threat_level=None
 +
|permissions=true
 +
|delay=0
 
|function_syntax=float osGetHealth(string avatar)
 
|function_syntax=float osGetHealth(string avatar)
 
|ossl_example=<source lang="lsl">
 
|ossl_example=<source lang="lsl">

Revision as of 08:00, 25 October 2017

float osGetHealth(string avatar)
Gets an avatars health by key and returns the value as a float.

See also OsCauseDamage, OsCauseHealing.

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.");
    }
}
Personal tools
General
About This Wiki