OsSetHealth

From OpenSimulator

Jump to: navigation, search
void 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 ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Delay 0 seconds
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
About This Wiki