diff options
author | TBG Renfold | 2012-08-09 18:03:26 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-24 00:13:14 +0100 |
commit | 4f3fabae5bec8a71f9953ef9f4c247e086e4757f (patch) | |
tree | e274526ce8e1653175f8da04000d8b07f10507b3 /OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |
parent | If a script state save fails for some reason on shutdown/region removal, get ... (diff) | |
download | opensim-SC-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.zip opensim-SC-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.tar.gz opensim-SC-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.tar.bz2 opensim-SC-4f3fabae5bec8a71f9953ef9f4c247e086e4757f.tar.xz |
Adds osGetHealth.
Returns the amount of health (in an integer) that an avatar has left in the scene.
If an avatar is not found or safe is enabled on a region, -1 is returned.
Example usage:
default
{
touch_end(integer _t)
{
key agentID = llDetectedKey(0);
osCauseDamage(agentID, 50);
llSay(0, llKey2Name(agentID) + " has " + (string)osGetHealth(agentID) + "% health left.");
}
}
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 1f000a3..9ad1c22 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -258,6 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
258 | int osGetSimulatorMemory(); | 258 | int osGetSimulatorMemory(); |
259 | void osKickAvatar(string FirstName,string SurName,string alert); | 259 | void osKickAvatar(string FirstName,string SurName,string alert); |
260 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); | 260 | void osSetSpeed(string UUID, LSL_Float SpeedModifier); |
261 | LSL_Float osGetHealth(string avatar); | ||
261 | void osCauseHealing(string avatar, double healing); | 262 | void osCauseHealing(string avatar, double healing); |
262 | void osCauseDamage(string avatar, double damage); | 263 | void osCauseDamage(string avatar, double damage); |
263 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | 264 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); |