OsSetHealth

From OpenSimulator

Revision as of 16:42, 5 August 2016 by Kcozens (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
float osSetHealth(string avatar, float health)
Sets an avatars health by key to the specified float value.

See also osGetHealth, OsCauseDamage, OsCauseHealing.

Threat Level High
Permissions No permissions specified
Extra Delay No function delay specified
Example(s)
default
{
    touch(integer t)
    {
        key agentID = llDetectedKey(0);
        osSetHealth(agentID, 50);
        llSay(0, llKey2Name(agentID) + " has " + (string)osGetHealth(agentID) + "% health left.");
    }
}
Personal tools
General
About This Wiki