OsGetHealRate
From OpenSimulator
(Difference between revisions)
Line 3: | Line 3: | ||
|function_syntax=float osGetHealRate(key avatar) | |function_syntax=float osGetHealRate(key avatar) | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
− | + | // | |
+ | // osSetHealth Script Exemple | ||
+ | // | ||
default | default | ||
Line 9: | Line 11: | ||
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 | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
} | } |
Revision as of 05:46, 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) | |
// // osSetHealth Script Exemple // 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."); } } |