|
Bounder Jimenez
programmer/designer
Join date: 12 Oct 2005
Posts: 45
|
12-20-2005 11:32
Ok, I've built an elevator. It works just fine. Now a customer wanted a "light" in the elevator which had a script in it that looked at the sun direction and it sets the primitive parameter to "PRIM_MATERIAL_LIGHT". This item is "linked" to the elevator so it provides a light inside. Problem is, when ever it changes it affects the entire elevator and anyone who tries to use the elevator will now fall through the floor.
Weirdest part about this is that if I remove the light and reset the material for the elevator back to metal, it will no longer work and acts like it is phantom. I.e, the elevator will go up and leave the person on the ground. I have to go back to a version of the elevator platform that didn't have the light in it to be able to make it work again (or recreate the platform).
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-20-2005 11:56
Light is an attribute of an object, not a surface.
If you just want to make the light "turn on", change the texture of the surface to full bright. You can use llSetPrimitiveParams() to do this.
|
|
Bounder Jimenez
programmer/designer
Join date: 12 Oct 2005
Posts: 45
|
12-20-2005 12:06
Yes, I know there are ways to work around this, but it doesn't get rid of the bug.  Prim A is the elevator base plate. Prims B-D are walls/roof, etc... Prim E is the "light" that came from elsewhere. Prim E has a script in it that calls "llSetPrimitiveParams" to change the material between glass/light. All these are linked with A being the base prim. Since its an elevator, it uses physics. Once E has run its script, even if you remove it from the link set, the whole elevator "acts" like it is phantom. Note that is still works with "llMoveToTarget" and all, just that it will no longer take an Avatar for a ride anymore. That is, it seems to change properties of all the prims in the elevator in a way that is not possible to see with the editor. Note that you can copy the elevator and the newer copy will work until the light comes on, then its back to the same strange state.
|
|
Bounder Jimenez
programmer/designer
Join date: 12 Oct 2005
Posts: 45
|
12-20-2005 12:29
From: someone If you just want to make the light "turn on", change the texture of the surface to full bright. You can use llSetPrimitiveParams() to do this. Actually the above does exactly the same thing to the elevator.... Maybe something else causes it.
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-20-2005 15:16
From: Bounder Jimenez Yes, I know there are ways to work around this, but it doesn't get rid of the bug.  You can't have an object that's partly made of metal, and partly made of light. The object as a whole is made of whatever the root prim is made of. When you turn the light into "light", you're telling LSL to turn the whole elevator into "light". But you're doing it from a prim that isn't the root prim of the object. I'm not surprised that it makes funny things happen. You may well have invented a new way to do "prim torture", for a different set of parameters!
|
|
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
|
12-20-2005 15:17
From: Bounder Jimenez Actually the above does exactly the same thing to the elevator....
Maybe something else causes it. o_O! What's your llSetprimitiveParams call look like?
|