Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Particles on Colision????

Mephistopheles Wingtips
Registered User
Join date: 17 Oct 2007
Posts: 10
02-14-2008 06:25
hello everyone, im just wondering if it is possible to get a particle script to start on colision. Ive written a particle script, as posted below, but id like to pop this script into an object, and when that object collides with anything, id like it to play this script. is that possible? or do i have to put a script into the object, thats says when collison is detected, play particle script? if i have to follow that second path, could someone help me out by posting the script i need here. anyways heres the script so far. ive highlightd where i think i need to put the collision detection.

// Particle Script

list MyParticleSettings;
MyParticleSystem()
{
MyParticleSettings = [
PSYS_SRC_TEXTURE,"983018ce-acbc-7c73-c668-5558f91c30ee",
PSYS_PART_START_SCALE,<0.0, 0.0, 0.0>,
PSYS_PART_START_COLOR,<1.0, 0.0, 0.0>,
PSYS_PART_START_ALPHA,0.8,
PSYS_PART_END_SCALE,<2.0, 2.0, 0.0>,
PSYS_PART_END_COLOR,<1.0, 0.0, 0.0>,
PSYS_PART_END_ALPHA,0.0,
PSYS_SRC_BURST_PART_COUNT,1,
PSYS_SRC_BURST_RATE,0.05,
PSYS_PART_MAX_AGE,0.5,
PSYS_SRC_MAX_AGE,0.5,
PSYS_SRC_PATTERN,1,
PSYS_SRC_BURST_RADIUS,0.0,
PSYS_SRC_ANGLE_BEGIN,0.0,
PSYS_SRC_ANGLE_END,0.0,
PSYS_SRC_OMEGA,<0.0, 0.0, 0.0>,
PSYS_SRC_ACCEL,<0.0, 0.0, 0.0>,
PSYS_SRC_BURST_SPEED_MIN,0.0,
PSYS_SRC_BURST_SPEED_MAX,0.0,
PSYS_SRC_TARGET_KEY,(key)"16f88dc9-aa7f-98b8-7c25-6a960df67f5b",
PSYS_PART_FLAGS, ( 339 ) ];
llParticleSystem( MyParticleSettings );
}
// Thats it for the particles, i presume i can specify it to start on collision under this line.

default
{
state_entry()
{
MyParticleSystem();
}

on_rez( integer iStartParameter )
{
llResetScript();
}

touch_start(integer total_number) //should i change this to collision_start?
{
}
}
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
02-14-2008 06:41
Perfectly possible.
See the 'collision' family of functions and events: http://wiki.secondlife.com/wiki/Category:LSL_Collision

EG:

default
{

collision_start(integer num)
{
MyParticleSystem();
}

}
Mephistopheles Wingtips
Registered User
Join date: 17 Oct 2007
Posts: 10
02-14-2008 06:52
thnx debbie, worked great, would you believe thats been bugging me for ages. :) thnx again
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-14-2008 08:09
don't forget the option to use llCollisionSprite
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Wordfromthe Wise
Cheerless & Sorrowful
Join date: 31 Jan 2007
Posts: 18
depreciated
02-18-2008 12:08
Was llCollisionSprite not depreciated together with the old particle system ?


From: Void Singer
don't forget the option to use llCollisionSprite
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
02-18-2008 12:49
lsl Portal says no,
lsl wiki says maybe it was unintentionally broken (jira VWR-322)

odd, portal is usually good about listing depreciations.

I'll test to be sure, and update the portal if need be.

::grumbles about people listing script functions as viewer issues when they should be service issues::

portal updated with a caveat of broken and a linke to the jira article. I'd have put it as depreciated but it doesn't seem like they meant to break it (it'd be a pain to trigger a particle system on every collision, just to shut it back down when you are only looking at a single sprite... but what do I know) and Soft Linden didn't seem to be aware of any intention to depreciate it (as quoted)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -