Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

particle target, and object key questions

Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
11-24-2007 12:16
ok best way to describe what im building..

its a circle with 8 particle emiters around its edge that are linked to a center Pin (root prim) which is also linked to an on off switch.. think round hottub jets :D

problem i am having is on rez my particles emiters lose the key of the target (root prim, Pin) and just use them self.. which is bad.

is there a good tut/info/example on object keys and how they work, and maybe an example of passin the Pins Key on rez to the 8 emiters.. i looked in the wiki, and the Keys page is a lil lacking. i know it can be done, but i think im having a brain hiccup, or im just thinkin to hard, lol

thx in advance
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
11-24-2007 13:08
Allo (: I think what you want to do is something like, have the target prim be the root prim (select it last when linking), then in your child prims, have them start their particle systems on_rez, but with llGetLinkKey(1) instead of a hard-coded UUID.
Solar Alter
Registered User
Join date: 21 Nov 2007
Posts: 30
11-24-2007 13:10
From the wiki.

LINK_ROOT 1 The root prim in a linked set (but not in a single prim, which is 0)
LINK_SET -1 All prims in the object.
LINK_ALL_OTHERS -2 All other prims in the object besides the prim the function is in.
LINK_ALL_CHILDREN -3 All child prims in the object.
LINK_THIS -4 The prim the script is in.
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
11-24-2007 13:11
Hi,

don't know if this will solve your problem (first time i haelp someone with scripting)
but i think it will.
I don't know what you use as targetkey but the key change everytime you rez it.

try next code line as target om ParticleSystem:
PSYS_SRC_TARGET_KEY, llGetLinkKey(0),

replace the 0 in llGetLinkKey with the number of the prim you want to target.

Hope this will help.
Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
11-24-2007 13:18
WOW... its like you all channeled your brain waves to me as you were responding... i just implemented llGetLinkKey(1) and boom perfection... durrrr i feel like a dummy :)) thank you all for the psychic gift, lol
Kaylan Draken
Registered User
Join date: 2 Dec 2006
Posts: 127
11-24-2007 13:35
LOL think i can start a job as mindreader.
Bill Schmo
Registered User
Join date: 16 Aug 2006
Posts: 53
11-24-2007 13:56
i'll make ya a crystal ball with a screwed up non-working particle script inside, :D hehe