Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Phoenix shooting fireball that explodes on impact

Psyra Extraordinaire
Corra Nacunda Chieftain
Join date: 24 Jul 2004
Posts: 1,533
10-23-2005 23:23
Collission particle explosion.

As part of my phoenix avvie, which can shoot harmless no-damage/no-push temp-on-rez fireballs (a two-prim bullet object emitting a fireball trail of smoke and flame like a comet), I'd like to add a secondary function.... namely, having the fireball explode in a pretty light show when it collides with something.

Right now it bounces off like a pool ball and looks a bit silly.

I'm a scripting idiot, generally, I'd love to know if there;s a script that basically can llDie the object and trigger a harmless particle boom (with a sound) when the fireball strikes a solid object. :)

Any weapons designers got a script for this or a function to add to Ana and Jopsy's particle script that can make this work? Thanks in advance if so. :)


- Psyra -
_____________________
E-Mail Psyra at psyralbakor_at_yahoo_dot_com, Visit my Webpage at www.psyra.ca :)

Visit me in-world at the Avaria sims, in Grendel's Children! ^^
Solar Ixtab
Seawolf Marine
Join date: 30 Dec 2004
Posts: 94
10-23-2005 23:34
Something to the effect of...

CODE

collision_start(integer num_detected)
{
particleSpam();
llTriggerSound("boom", 0.5);
llDie();
}
land_collision(vector pos)
{
particleSpam();
llTriggerSound("boom", 0.5);
llDie();
}


Where particleSpam() is a function that calls your particle generator. If you need more than this, hit me up in-world and I'll see what I can grind out.
_____________________
Despite our best efforts, something unexpected has gone wrong.
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
10-24-2005 01:51
Don't call llDie() right after making the call to llParticleSystem(), doing it this way can cause the particle effects to never be triggered on clients. I generally turn the projectile non-physical and invisible for a second or so after starting particles (with a PSYS_SRC_MAX_AGE parameter set), then call llDie().
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Psyra Extraordinaire
Corra Nacunda Chieftain
Join date: 24 Jul 2004
Posts: 1,533
10-24-2005 06:37
*takes notes, having no clue how to incorporate Jesrad's part into it, since as stated before, poor Psyra's a scripting idiot.* :D
_____________________
E-Mail Psyra at psyralbakor_at_yahoo_dot_com, Visit my Webpage at www.psyra.ca :)

Visit me in-world at the Avaria sims, in Grendel's Children! ^^
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-24-2005 12:02
From: Psyra Extraordinaire
*takes notes, having no clue how to incorporate Jesrad's part into it, since as stated before, poor Psyra's a scripting idiot.* :D


CODE

collision_start(integer num_detected)
{
particleSpam();
llTriggerSound("boom", 0.5);
llSetPrimitiveParams([
PRIM_PHYSICS,FALSE,
PRIM_PHANTOM,TRUE,
PRIM_COLOR,ALL_SIDES,<1,1,1>,0.0]);
llSleep(1.0);
llDie();
}
land_collision(vector pos)
{
particleSpam();
llTriggerSound("boom", 0.5);
llSetPrimitiveParams([
PRIM_PHYSICS,FALSE,
PRIM_PHANTOM,TRUE,
PRIM_COLOR,ALL_SIDES,<1,1,1>,0.0]);
llSleep(1.0);
llDie();
}