Difference between revisions of "Bullet"
Jump to navigation
Jump to search
Mrzebra Arai (talk | contribs) m |
m (Fixed things at the wrong level, added duplicate lines by mistake. Fixed now.) |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{LSL Header}} | |||
==Script== | ==Script== | ||
< | Works well with [[Self-Destruction|Self Destruction]] script. | ||
<syntaxhighlight lang="lsl2"> | |||
// Davada Gallant (John Girard), WWIIOLers | |||
// Distributable Bullet Code | // Distributable Bullet Code | ||
key z = "b85073b6-d83f-43a3-9a89-cf882b239488";f() { llMakeExplosion(5, 0.1, 0.01, 2, .5, z, <0,0,0>); } default { on_rez(integer a) { llResetScript(); } state_entry() { llSetStatus(STATUS_PHYSICS, TRUE); llSetStatus(STATUS_DIE_AT_EDGE, TRUE); llSetBuoyancy(0.1); llSetDamage(100); } collision_start(integer a) { f(); llDie(); } touch_start(integer a) { f(); llDie();} land_collision_start(vector a) {f();llDie(); }} | key z = "b85073b6-d83f-43a3-9a89-cf882b239488"; | ||
</ | f() | ||
{ | |||
llMakeExplosion(5, 0.1, 0.01, 2, .5, z, <0,0,0>); | |||
} | |||
default | |||
{ | |||
on_rez (integer a) | |||
{ | |||
llResetScript(); | |||
} | |||
state_entry () | |||
{ | |||
llSetStatus(STATUS_PHYSICS, TRUE); | |||
llSetStatus(STATUS_DIE_AT_EDGE, TRUE); | |||
llSetBuoyancy(0.1); | |||
llSetDamage(100); | |||
} | |||
collision_start (integer a) | |||
{ | |||
f(); | |||
llDie(); | |||
} | |||
touch_start (integer a) | |||
{ | |||
f(); | |||
llDie(); | |||
} | |||
land_collision_start( vector a) | |||
{ | |||
f(); | |||
llDie(); | |||
} | |||
} | |||
</syntaxhighlight> | |||
[[Category:LSL Examples]] | |||
== See Also == | |||
'''Articles''' | |||
*[[:Category:LSL Examples|LSL Examples]]: [[Self-Destruction|Self Destruction]] | |||
{{LSLC|Examples|Bullet}} |
Latest revision as of 02:59, 6 December 2023
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Script
Works well with Self Destruction script.
// Davada Gallant (John Girard), WWIIOLers
// Distributable Bullet Code
key z = "b85073b6-d83f-43a3-9a89-cf882b239488";
f()
{
llMakeExplosion(5, 0.1, 0.01, 2, .5, z, <0,0,0>);
}
default
{
on_rez (integer a)
{
llResetScript();
}
state_entry ()
{
llSetStatus(STATUS_PHYSICS, TRUE);
llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
llSetBuoyancy(0.1);
llSetDamage(100);
}
collision_start (integer a)
{
f();
llDie();
}
touch_start (integer a)
{
f();
llDie();
}
land_collision_start( vector a)
{
f();
llDie();
}
}
See Also
Articles