|
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
|
12-22-2008 12:22
I am not a scripter by any means....I just look at scripts and become nauseous and want to run away screaming. As my New Year's resolution, I am trying to understand *shudders* a little about basic scripting. I was taking a class recently where we put a particle script into an item then we were told we could deleted the script in the object it would still run but would reduce lag. You would have to use a scrubber script to permanently wipe out the scripting in the object and stop it from behaving as if scripted.
My questions is, is this true of all scripts in SL (they will continue to run even if the scripted is deleted) or just some particular type of scripts?
Thanks!
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
12-22-2008 12:56
The scripts DON'T continue to run, but it turns out the particles emitted by a prim are a property of that prim, like its name, its texture, its color, its shininess, etc. are. The only thing different about particles is that you can't set them EXCEPT using a script (there's no tab in the Edit window that lets you set particle parameters). Does that make sense?
There are a number of other properties that can only be set by a script, but that stick with the prim (they don't really need a script except to change the setting). Some of them are:
* Floating text * Sit target (if a sit target is set, you ALWAYS sit there when you sit on the prim; when a sit target is not set, it depends on where you click, if there is "room" to sit there, etc.) * Particles * Satic camera parameters (the place your camera automatically jumps to when you sit on the prim) * Touch text (right-click on the object; by default you see the word "Touch" in the pie menu, but you can change that to say something else)
There are several other things, but they start to get rather obscure. There are "scrubber" scripts out there that (try to) return a prim to a pristine state by resetting all of the prim's properties to their defaults. The most sure way is simply to create a new prim and start from there, of course.
EDIT: Here is a rather tricky one that some scrubber scripts miss. Many people refer to it as, "prim torture." If you change the type of a prim (sphere, box, cylinder, etc.) it changes what properties are available in the Edit window. For example, "dimple" start and end are available for spheres, but not for boxes. However, some of those properties continue to affect the geometry of the prim even when the setting doesn't show up in the Edit window. The "dimple" setting continues to affect boxes, for example, so even when the type of the prim hides the setting from the UI, it is still important. So to "scrub" a prim's geometry completely, you'd have to set the prim to several different geometry types and use the defaults for all the geometry settings, before returning the prim to the type that you really want.
|
|
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
|
12-22-2008 13:27
Thank you! Your explanation made sense. I know I have run across this phenomenon with the anim smooth script for running water before...just didn't know the particulars. Again, thanks for addressing my question in an easy to read manner.
Happy Holidays to you and yours.
|
|
Nardok Corrimal
Registered User
Join date: 23 Jun 2006
Posts: 6
|
12-24-2008 21:16
From: Hewee Zetkin EDIT: Here is a rather tricky one that some scrubber scripts miss. Many people refer to it as, "prim torture." If you change the type of a prim (sphere, box, cylinder, etc.) it changes what properties are available in the Edit window. For example, "dimple" start and end are available for spheres, but not for boxes. However, some of those properties continue to affect the geometry of the prim even when the setting doesn't show up in the Edit window. The "dimple" setting continues to affect boxes, for example, so even when the type of the prim hides the setting from the UI, it is still important. So to "scrub" a prim's geometry completely, you'd have to set the prim to several different geometry types and use the defaults for all the geometry settings, before returning the prim to the type that you really want. This is not true. LSL's llSetPrimitiveParams will NOT access these "hidden" prim settings. If you set the PRIM_TYPE to box that will negate any dimple settings by default.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
12-24-2008 23:55
From: Nardok Corrimal This is not true. LSL's llSetPrimitiveParams will NOT access these "hidden" prim settings. If you set the PRIM_TYPE to box that will negate any dimple settings by default. Huh. Interesting. I just tried it and you're right that at least the dimple is reset by setting the prim to a box with llSetPrimitiveParams(). I could have sworn that had to be fixed up too. I guess it does, but only by setting the prim type and shape ONCE, not multiple times. There are certainly scrubbers that miss that one step though. You DO have to set the prim's type (not simply any property) with llSetPrimitiveParams().
|
|
Awnee Dawner
object returned to sim
Join date: 7 Apr 2008
Posts: 206
|
12-26-2008 10:13
hey! From: Hewee Zetkin There are a number of other properties that can only be set by a script, but that stick with the prim (they don't really need a script except to change the setting). Some of them are:
* Floating text * Sit target (if a sit target is set, you ALWAYS sit there when you sit on the prim; when a sit target is not set, it depends on where you click, if there is "room" to sit there, etc.) * Particles * Satic camera parameters (the place your camera automatically jumps to when you sit on the prim) * Touch text (right-click on the object; by default you see the word "Touch" in the pie menu, but you can change that to say something else)
* loop sound * texture animation is also "baked" to the primitive. to remove "baked" effects you may use a kill script ie Floating text -> without text Touch text -> without text llSetText("",<0,0,0>,0)
_____________________
>> yes <<
|