OsCauseDamage

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{| width="100%" style="border: thin solid black"
+
{{osslfunc
| colspan="2" align="center" style=background:orange | '''{{SUBPAGENAME}}'''
+
|threat_level=High
|- valign="top"
+
|permissions=${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|'''Threat Level''' || <Threat Level goes here>
+
|delay=0
|- valign="top"
+
|function_syntax= osCauseDamage(key avatar, float damage)
|'''Function Syntax''' || <source lang="lsl">
+
|description=Implemented December 30,2009 by Revolution in GIT# 87959464c9db8948bed89909913400bc2eb7524d - Rev 11850
osCauseDamage(string avatar, double damage);
+
This is an updated version of Mantis 0003777. It allows for damage on collision, touch, etc.<br>
</source>
+
|ossl_example=<source lang="lsl">
|- valign="top"
+
//
|'''Example(s)||<source lang="lsl">
+
// osCauseDamage Script Example
 +
//
 +
 
 +
// This is the default state definition
 
default
 
default
 
{
 
{
  state_entry()
+
    // This function is called when the script enters the default state
  {
+
    state_entry()
      osCauseDamage(llGetOwner(), 50);
+
    {
  }
+
        // This line causes damage to the owner of the script, reducing their health by 50 points
 +
        osCauseDamage(llGetOwner(), 50);
 +
    }
 
}
 
}
 +
 
</source>
 
</source>
|}
+
|additional_info=
'''Implemented December 30,2009 by Revolution in GIT# 87959464c9db8948bed89909913400bc2eb7524d - Rev 11850'''
+
}}
 
+
== See Also ==
This is an updated version of Mantis 0003777. It allows for damage on collision, touch, etc.
+
* [[osGetHealth]]
 
+
* [[osSetHealth]]
Related to [[OsCauseHealing]]
+
* [[osGetHealRate]]
 
+
* [[osSetHealRate]]
[[Category:OSSL Functions]]
+
* [[OsCauseDamage]]
[[Category:OSSL functions without threat level]]
+
* [[OsCauseHealing]]

Latest revision as of 01:08, 7 March 2024

osCauseDamage(key avatar, float damage)
Implemented December 30,2009 by Revolution in GIT# 87959464c9db8948bed89909913400bc2eb7524d - Rev 11850

This is an updated version of Mantis 0003777. It allows for damage on collision, touch, etc.

Threat Level High
Permissions ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Extra Delay 0 seconds
Example(s)
//
// osCauseDamage Script Example
//
 
// This is the default state definition
default
{
    // This function is called when the script enters the default state
    state_entry()
    {
        // This line causes damage to the owner of the script, reducing their health by 50 points
        osCauseDamage(llGetOwner(), 50);
    }
}


[edit] See Also

Personal tools
General
About This Wiki