OsSetHealth

From OpenSimulator

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

Revision as of 15:20, 3 December 2020

osSetHealth(key avatar, float health)
Sets an avatars health by key to the specified float value.
Threat Level High
Permissions ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Extra 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.");
    }
}
Notes
This function was added in 0.9.0.1


See Also:

Personal tools
General
About This Wiki