Difference between revisions of "LlSetDamage"
Jump to navigation
Jump to search
m |
(Rewrite function footnote) |
||
Line 3: | Line 3: | ||
|sort=SetDamage | |sort=SetDamage | ||
|func=llSetDamage|p1_type=float|p1_name=damage | |func=llSetDamage|p1_type=float|p1_name=damage | ||
|func_footnote= | |func_footnote= | ||
The valid range of '''damage''' is 0.0 (no [[damage]]) ~ 100.0 (instant [[death|kill]]). To give an agent the damage with this object, | |||
*The object must be physical, and | |||
*The agent must be on the land where "Safe (no damage)" is disabled. | |||
Once the object hits the agent, the agent receives the damage, and the object will [[llDie|die]] without [[collision]] event. | |||
|func_desc=Sets the amount of damage that will be done when this object hits an agent. | |func_desc=Sets the amount of damage that will be done when this object hits an agent. | ||
|return_text | |return_text |
Revision as of 07:20, 25 May 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSetDamage( float damage );157 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Sets the amount of damage that will be done when this object hits an agent.
• float | damage |
The valid range of damage is 0.0 (no damage) ~ 100.0 (instant kill). To give an agent the damage with this object,
- The object must be physical, and
- The agent must be on the land where "Safe (no damage)" is disabled.
Once the object hits the agent, the agent receives the damage, and the object will die without collision event.
Caveats
Examples
<lsl> //Simple autokiller bullet: //When it rezzed it scans for the closest person, //Moves to their location and kills them. (Because //It collides with them) default {
on_rez(integer i) { llSetTimerEvent(10.0); llSetDamage(10000.0); llSensor("", "", AGENT, PI, 96.0); } timer() { llDie(); } sensor(integer num) { for(num = 100;--num;) llSetPos(llDetectedPos(0)); }}</lsl>