OsGetHealth

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Added permissions and delay information)
m (Added note stating which version of OpenSim introduced this function)
Line 18: Line 18:
  
 
See also [[OsCauseDamage]], [[OsCauseHealing]].
 
See also [[OsCauseDamage]], [[OsCauseHealing]].
|
+
|additional_info=This function was added in 0.7.5-post-fixes
 
}}
 
}}

Revision as of 09:47, 15 October 2018

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.");
    }
}
Notes
This function was added in 0.7.5-post-fixes
Personal tools
General
About This Wiki