OsSetHealth
From OpenSimulator
(Difference between revisions)
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=High | |threat_level=High | ||
− | |function_syntax= | + | |permissions=${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
+ | |delay=0 | ||
+ | |function_syntax= osSetHealth(key avatar, float health) | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
default | default | ||
Line 16: | Line 18: | ||
See also [[osGetHealth]], [[OsCauseDamage]], [[OsCauseHealing]]. | See also [[osGetHealth]], [[OsCauseDamage]], [[OsCauseHealing]]. | ||
− | | | + | |additional_info=This function was added in 0.9.0.1}} |
− | }} | + |
Revision as of 17:20, 1 May 2019
osSetHealth(key 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."); } } | |
Notes | |
This function was added in 0.9.0.1 |