|
Niko Xingjian
Registered User
Join date: 16 Oct 2005
Posts: 34
|
02-21-2007 13:51
I feel like such and idiot with this problem, but it has been driving me up the wall!! I am trying to get a particle script in one prim to target another, both in attachments and static objects.... I have carefully gone through the whole forum, looking at all the examples, reading all the threads, and trying everything suggested. and still all my particles do is go straight up. no targeting occurs. I cant really post my script because ive tried dozens of them in my attempt... at this point im about ready to call it quits and pay someone to write the script for me in world  can anyone help me?
|
|
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
|
02-21-2007 14:00
Have you checked out the Particle Lab? Search in-world for particle and you'll find it - lots of good info there..
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
02-21-2007 14:13
To target another object, prim or Avatar all you need is its key and then add the following to the particle parameters PSYS_SRC_TARGET_KEY,TargetId, Obtaining the key can use a sensor or could be hard coded.
|
|
Niko Xingjian
Registered User
Join date: 16 Oct 2005
Posts: 34
|
02-21-2007 17:02
That works just fine for two unlinked prims that have been statically placed... but I need to be able to make it work with an attachment or an object that will be rezzed multiple times, and therein lies my problem.. getting this to worked within linked sets and with objects that change UUIDs...
I dunno....I might just have to keep banging away at it till I go insane...*sigh*
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
02-21-2007 17:20
Newgate - Don't forget you should also include: PSYS_PART_FLAGS, PSYS_PART_TARGET_POS_MASK Niko- I'm assuming the target prim attached to the avatar isn't already linked to the emitter prim attachment? The only certain way I know of for an avatar's attachments to target other attachments is using listen(). ie: On the target prim: integer mychan = 99999; // change to suit yourself default { state_entry() { llSay( mychan, "hitme" ); } on_rez(integer n) { llSleep(1.0); llResetScript(); } } On the emitter attachment: integer mychan = 99999; // use same channel as target script integer listener; default { state_entry() { listener = llListen( mychan, "", "", "hitme" ); } listen( integer chan, string name, key id, string msg ) { llParticleSystem( [ // blah blah blah blah blah PSYS_SRC_TARGET_KEY, id, PSYS_PART_FLAGS, // mask | mask | mask | .... PSYS_PART_TARGET_POS_MASK ] ); llListenRemove( listener ); } on_rez(integer n) { llResetScript(); } }
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources. Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
|
|
Niko Xingjian
Registered User
Join date: 16 Oct 2005
Posts: 34
|
02-21-2007 20:02
wow! thanks Jopsy...
the target prim bit was what I needed! I had the target script all screwed in all versions I tried
|