OsGetHealRate
From OpenSimulator
(Difference between revisions)
(Created page with "{{osslfunc |threat_level=None |function_syntax=float osGetHealRate(key avatar) |ossl_example=<source lang="lsl"> key uuid; default { state_entry() { llSay(PUB...") |
|||
Line 30: | Line 30: | ||
</source> | </source> | ||
|description=Gets an avatars health rate by key and returns the value as a float. | |description=Gets an avatars health rate by key and returns the value as a float. | ||
+ | |||
+ | 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.<br /> | ||
See also [[OsSetHealRate]], [[OsGetHealth]], [[OsCauseDamage]], [[OsCauseHealing]]. | See also [[OsSetHealRate]], [[OsGetHealth]], [[OsCauseDamage]], [[OsCauseHealing]]. | ||
| | | | ||
}} | }} |
Revision as of 05:20, 15 April 2017
float osGetHealRate(key avatar)
| |
Gets an avatars health rate by key and returns the value as a float.
Default heal rate is now around 0.5% per second. See also OsSetHealRate, OsGetHealth, OsCauseDamage, OsCauseHealing. | |
Threat Level | None |
Permissions | No permissions specified |
Extra Delay | No function delay specified |
Example(s) | |
key uuid; default { state_entry() { llSay(PUBLIC_CHANNEL, "Script running"); } touch_start(integer number) { uuid = llDetectedKey(0); llOwnerSay("osGetHealRate Before = " + (string)osGetHealRate(uuid)); osSetHealRate(uuid, llFrand(1.0)); llOwnerSay("osGetHealRate After = " + (string)osGetHealRate(uuid)); llSetTimerEvent(5.0); } timer() { llSetTimerEvent(0.0); osSetHealRate(uuid, 0.5); llOwnerSay("osGetHealRate Default = " + (string)osGetHealRate(uuid)); } } |