OsSetHealRate
From OpenSimulator
(Difference between revisions)
(Created page with "{{osslfunc |threat_level=High |function_syntax=float osSetHealRate(key avatar, float healrate) |ossl_example=<source lang="lsl"> key uuid; default { state_entry() { ...") |
m (Change See Also) |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
|threat_level=High | |threat_level=High | ||
+ | |permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | ||
+ | |delay=0 | ||
|function_syntax=float osSetHealRate(key avatar, float healrate) | |function_syntax=float osSetHealRate(key avatar, float healrate) | ||
+ | |description=Sets the automatic healing rate in % per second. | ||
+ | Default heal rate is now around 0.5% per second.<br> | ||
+ | A value of zero can disable automatic heal, current maximum value is 100 % per second. | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
− | + | // | |
+ | // osSetHealth Script Example | ||
+ | // | ||
default | default | ||
Line 9: | Line 16: | ||
state_entry() | state_entry() | ||
{ | { | ||
− | + | key uuid = llGetOwner(); | |
− | + | osSetHealRate(uuid, 10.0); | |
− | + | osCauseDamage(uuid, 50.0); | |
− | + | llOwnerSay("osGetHealRate = " + (string)osGetHealRate(uuid)); | |
− | + | llOwnerSay(llKey2Name(uuid) + " has " + (string)osGetHealth(uuid) + "% health left."); | |
− | + | ||
− | + | ||
− | + | ||
− | llOwnerSay("osGetHealRate | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
} | } | ||
</source> | </source> | ||
− | | | + | |additional_info=This function was added in 0.9.0.1 |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
}} | }} | ||
+ | == See Also == | ||
+ | * [[osGetHealth]] | ||
+ | * [[osSetHealth]] | ||
+ | * [[osGetHealRate]] | ||
+ | * [[osSetHealRate]] | ||
+ | * [[OsCauseDamage]] | ||
+ | * [[OsCauseHealing]] |
Latest revision as of 18:48, 5 December 2020
float osSetHealRate(key avatar, float healrate)
| |
Sets the automatic healing rate in % per second.
Default heal rate is now around 0.5% per second. | |
Threat Level | High |
Permissions | ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
Extra Delay | 0 seconds |
Example(s) | |
// // osSetHealth Script Example // default { state_entry() { key uuid = llGetOwner(); osSetHealRate(uuid, 10.0); osCauseDamage(uuid, 50.0); llOwnerSay("osGetHealRate = " + (string)osGetHealRate(uuid)); llOwnerSay(llKey2Name(uuid) + " has " + (string)osGetHealth(uuid) + "% health left."); } } | |
Notes | |
This function was added in 0.9.0.1 |
[edit] See Also
- osGetHealth
- osSetHealth
- osGetHealRate
- osSetHealRate
- OsCauseDamage
- OsCauseHealing