OsGetHealth

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "Gets an avatars health by key. Example usage: default { touch(integer t) { key agentID = llDetectedKey(0); osCauseDam...")
 
Line 1: Line 1:
Gets an avatars health by key.
+
Gets an avatars health by key and returns the value as a float.
  
 
Example usage:
 
Example usage:

Revision as of 02:14, 24 August 2012

Gets an avatars health by key and returns the value as a float.

Example usage:

    default
    {
        touch(integer t)
        {
            key agentID = llDetectedKey(0);
            osCauseDamage(agentID, 50);
            llSay(0, llKey2Name(agentID) + " has " + (string)osGetHealth(agentID) + "% health left.");
        }
    }
Personal tools
General
About This Wiki