|
Count Acronym
Registered User
Join date: 15 Jan 2007
Posts: 8
|
12-21-2008 18:54
I have thirteen different prims with a particle emitting script inside each one. What I'd like to do is have a master control prim connect to each of the 13 prims and pass parameters to them to control color, rate, speed, etc. options.
My question is: Would I accomplish this by linking the "child" prims with the master prim? I don't know anything at all about linking prims (other than physically linking prims while building) but I've glanced through some LSL tutorials and saw script linking being discussed and assumed it was a way to control scripts/prims programatically. Is this correct?
Also, if linking prims to a master control prim is a doable way to accomplish this, are there any drawbacks to doing it this way?
Thanks!
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
12-21-2008 19:02
Linking the prims will enable the scripts in the prims to use llMessageLinked (note: I had llInstantMessage here at first by mistake) to talk to each other, which is faster than other ways such as llSay.
As for a downside, the object would have to be linked, which imposes a lot restrictions compared to unlined objects.
If the objects serve their purpose just fine while linked there's no downside to linking them.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|
|
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
|
12-21-2008 19:19
From: SuezanneC Baskerville Linking the prims will enable the scripts in the prims to use llInstantMessage to talk to each other, which is faster than other ways such as llSay. As for a downside, the object would have to be linked, which imposes a lot restrictions compared to unlined objects. If the objects serve their purpose just fine while linked there's no downside to linking them. You would need to use llMessageLinked and link_message rather than llInstantMessage on linked prims. http://wiki.secondlife.com/wiki/LlMessageLinked
_____________________
There are no stupid questions, just stupid people.
|
|
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
|
12-21-2008 19:20
I have a number of particle systems that do this... 1. Generate the list of parameters in the Control script [YOUR_LIST] 2. Dump the list to a string, and pass this string to the child prims using llMessageLinked eg: string YOUR_LIST_AS_STRING = llDumpList2String([YOUR_LIST], " | "  ; llMessageLinked(LINK_ALL_OTHERS, 0, YOUR_LIST_AS_STRING , NULL_KEY); 3. The child prims receive the message in link_message and "rebuild" the original list using llParseString2List eg: list REBUILT_LIST = llParseString2List(YOUR_LIST_AS_STRING, (list)" | ", (list)""  ; 4. Extract the individual parameters from REBUILT_LIST using llList2String, llList2Integer, llList2Float, llList2Vector et al as appropiate http://rpgstats.com/wiki/index.php?title=Listhttp://rpgstats.com/wiki/index.php?title=llMessageLinkedhttp://lslwiki.net/lslwiki/wakka.php?wakka=llDumpList2Stringhttp://lslwiki.net/lslwiki/wakka.php?wakka=llParseString2List
_____________________
http://wiki.secondlife.com/wiki/User:debbie_Trilling
|
|
Count Acronym
Registered User
Join date: 15 Jan 2007
Posts: 8
|
12-21-2008 19:33
Thanks so much, Debbie! That's exactly what I was looking for. I figured it could be done, but I haven't, yet, explored using link communication between prims. Now that you've put me on the right path, I don't think I'll have any problems doing what I need to do!
Again, thanks so much for the help! Also, thank you, too, Laurence and SuezanneC, for your advice and information!
|
|
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
|
12-21-2008 19:39
I must be tired and dazed from sitting at the computer all day.
I meant llMessageLinked.
_____________________
-
So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.
I can be found on the web by searching for "SuezanneC Baskerville", or go to
http://www.google.com/profiles/suezanne
-
http://lindenlab.tribe.net/ created on 11/19/03.
Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard, Robin, and Ryan
-
|