help! how to stop lag in linked prim controller scripts?
|
Blush Bravin
Registered User
Join date: 5 Aug 2008
Posts: 9
|
08-10-2009 09:34
I began using a linked prim controller script in my jewelry. A purchased script and have been made aware that this script causes incredible lag because of the number of prims/scripts in my jewelry.
I am thinking if I had a script that slept when not being used to change textures/color the lag issue would go away. I know absolutely nothing about writing scripts. Is it possible to get such a script?
Thanks for any info you can share on this subject.
|
Vance Adder
Registered User
Join date: 29 Jan 2009
Posts: 402
|
08-10-2009 09:41
What is commonly used is an option to "delete" the scripts once you find a configuration you like. If you opt for this, I'd suggest the item be copiable so people can store a backup incase they ever want to change the configuration.
|
Blush Bravin
Registered User
Join date: 5 Aug 2008
Posts: 9
|
08-10-2009 09:48
Problem with deleting the scripts is that then the customer loses the options to change the color/texture. I sell all my jewelry no copy/no mod/trans for ease in gift giving.. it's jewelry afterall, but I may have to drastically rethink how to proceed with my business now.
|
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
|
08-10-2009 10:16
If you are changing the texture/colour, you only need one script, calling llSetLinkColor or llSetLinkTexture (or both, with llSetLinkPrimitiveParams). You can easily change the colour/texture of specific groups of prims using this method, too -- Hewee Zetkin, this thread, generously provided a method of which I use variations all the time: /54/06/265951/1.htmlIf you're resizing the jewelry it's a bit more complicated, since you really do need a script in each prim, but it's not too difficult to script something that deletes the resizer scripts in the child prims when you don't need them, but lets you re-propagate them if necessary. This function, from Emma Nowhere's "Fix Small Prims" at http://wiki.secondlife.com/wiki/Fix_Small_Prims GiveScriptToLinkedPrims() { integer p = llGetNumberOfPrims(); integer i = 0; for (i = 2; i <= p; i++) { key prim = llGetLinkKey(i); llGiveInventory(prim, llGetScriptName()); } }
does the trick, though see her comments in that script for instructions on how to use it and activate the scripts after you're propagated them through the linkset.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
08-10-2009 11:23
Along these lines, see  , where there's a recnt discussion of how to change several different parameters on selected linked prims, using a single script in the root prim.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
|
08-10-2009 12:00
Hi Blush. As a consumer, I really applaud your doing the research to decrease lag in your jewelry.
I also wanted to volunteer that I'd prefer to have a script removal option, so long as your product is copiable. I change texture/color when I put together an outfit, don't change it on the fly at an occasion.
I usually only bother to fool with colors when I'm going to a party or performance, someplace special ... and nearly always there's a crowd there. So, I will always choose unscripted items at those times, even if they don't look as well. Being able to remove scripts makes it so that I would wear your stuff in a crowd.
[for example, I love my Tekeli-i jewelry, but hardly ever wear it.] .
|
Blush Bravin
Registered User
Join date: 5 Aug 2008
Posts: 9
|
08-10-2009 12:01
I love the advice. I've tried to read and understand the linked posts offered. But I know nothing about scripting. I bought this script and used the directions on how to use the script.
Is there no way to write a script that has a way to turn off the scripts when not in use?
And if there is or if there is a way around my problem, is there a scripter out there who would write the script and sell it to me with easy to understand instructions?
The script I am currently using just came out with an udated version that has a "delete" option. If all else fails I suppose I will change the permissions on my jewelry and sell it as copy/no mod/ no trans and continue using the script I currently have.
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
08-10-2009 12:19
Yes, you can use llSetScriptState("scriptname", FALSE) in a new script to turn off a different script running in the same prim. Of course, then that script has to still be running if you want to be able to use llSetScriptState("scriptname",TRUE) to turn it back on again. It's much better to use one of the two solutions suggested in this thread: (a) make your jewelry copiable and include an option to delete scripts or (b) use a single script in the root prim that changes properties of all or some linked prims. I doubt that the script you purchased can be modified, but I could be surprised. In any case, if you aren't going to do the work yourself, you'll have better luck finding help in the Service Wanted forum, since this forum is for people who are interested in sharpening their own scripting skills.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Blush Bravin
Registered User
Join date: 5 Aug 2008
Posts: 9
|
08-10-2009 13:03
Well I do appreciate the responses. I am trying to understand how the scripts work, but I am such a novice. I will repopulate the pieces I have already completed with the updated script that has the "delete" scripts option and change the permissions on my jewelry that use the script to be able to copy.
In no way do I want to be a contributor to the lag problems we have in SL. Plus I want to provide my customers with the very best product I can possibly make.
So many thanks to all those who responded or who are yet to respond. It has helped me solidify my options and come to what I think is the best choice at this time.
~Blush
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
08-10-2009 22:26
there is a possible logic to allow you to change parameters across a linkset in multiple prims, providing that those features will be shared by more than one prim...
as an example, I have a color change script on the forum here and my wiki user page that modifies a whole set of prims based on the color of one, where the script resides.... not all parameters will work well this way, especially if all the prims to change aren't taking similar values.
the logic is to use the one local prim with the script in it to stand in for all the prims it will modify, so that you read all your current settings from it, then use llSetLink* commands to process the other prims.
_____________________
| | . "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... | - 
|