OsSetHealth
From OpenSimulator
(Difference between revisions)
m (Added permissions and delay information) |
|||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=High | |threat_level=High | ||
+ | |permissions=${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | ||
+ | |delay=0 | ||
|function_syntax=void osSetHealth(string avatar, float health) | |function_syntax=void osSetHealth(string avatar, float health) | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> |
Revision as of 08:08, 25 October 2017
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 |
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."); } } |