Difference between revisions of "Bullet"

From Second Life Wiki
Jump to navigation Jump to search
m (Bullet (script) moved to Bullet: Entry name clarified)
(Let it appear a bit nicer)
Line 1: Line 1:
{{LSL Header}}
{{LSL Header}}
<div id="box">
==Script==
==Script==
Works well with [[Self-Destruction|Self Destruction]] script.
<div style="padding: 0.5em;">
<pre>
<pre>
// Davada Gallant (John Girard), WWIIOLers
// Davada Gallant (John Girard), WWIIOLers
Line 41: Line 44:
}
}
</pre>
</pre>
</div></div>
<div id="box">
== See Also ==
<div style="padding: 0.5em">
'''Articles'''
*LSL Examples: [[Self-Destruction|Self Destruction]]
</div></div>
{{LSLC|Examples|Bullet}}
{{LSLC|Examples|Bullet}}

Revision as of 06:34, 18 September 2007

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