Gabriel Lemieux
Consumate Newbie
Join date: 28 Aug 2005
Posts: 18
|
10-21-2005 11:34
Hey guys.... me again with these stupid horn attachments. All my scripts are finally working, everything's compiling, the scripts pick up the commands, react to the commands, and change the color and alpha for my horns. However... I just recently discovered that my commands to change the material of the prims (metal, glass, and light) isn't actually changing the material. The script: default {
link_message(integer sender_num, integer num, string str, key id) { if (str == "metal") { llSetPrimitiveParams([PRIM_MATERIAL, PRIM_MATERIAL_METAL]); llSetAlpha(1.0, ALL_SIDES); } if (str == "glass") { llSetPrimitiveParams([PRIM_MATERIAL, PRIM_MATERIAL_GLASS]); llSetAlpha(0.6, ALL_SIDES); } if (str == "light") { llSetPrimitiveParams([PRIM_MATERIAL, PRIM_MATERIAL_LIGHT]); llSetAlpha(0.2, ALL_SIDES); } } } Like I said, the script *is* changing the alpha, just not the material. I noticed because every time I change something to light, it never lit up, so I checked one of them out and changed it to each of the materials... and it always stayed on the material I selected when I originally created the prim. In one case, I left it as wood, so it stayed as wood. Now I manually changed one to light, and it's staying as light no matter what the script says. Am I doing this right, or did I miss something again? Thanks again for the help!
_____________________
-GLX
When you don't know what's possible, anything is...
|
Gabriel Lemieux
Consumate Newbie
Join date: 28 Aug 2005
Posts: 18
|
10-24-2005 06:11
*bump*
Edited the post to make a question a little clearer. I've been pouring over the LSL wiki, but can't seem to figure out what, if anything, I'm doing wrong.
_____________________
-GLX
When you don't know what's possible, anything is...
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-24-2005 06:19
I've noticed that when I change the material of a child prim in an object, it takes up to a few minutes for SL to reflect the change.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|
Lestat Llewelyn
Memnochs Madness
Join date: 27 Jul 2004
Posts: 19
|
10-24-2005 06:21
your scripting seems fine are you sure your linked messages are getting through?
|
Gabriel Lemieux
Consumate Newbie
Join date: 28 Aug 2005
Posts: 18
|
10-24-2005 10:47
From: Lestat Llewelyn your scripting seems fine are you sure your linked messages are getting through? Very sure. The alpha changes just fine. I also have other if statements that excute different color change which I omitted to keep the post short. They all work as well, so the linked messages are getting through. It's just the llSetPrimitiveParams statements that don't seem to work. A better example would be: I have a horn, and I Drop the horn and Edit it. From the edit menu, I change the material to Metal. I reattach it. Then I execute the command to change it to light via my script. Then, after a while, I Drop it and Edit it again. Still Metal. If you guys are affirming that I'm doing this correctly, then I have no idea what's going on. All I know is that, for me, the material isn't changing, and I can't get my attachements to turn into light. If my script is fine, and everything is in place, then I guess I can go ahead and sell these things and hope for the best, but they look great as light, and I want to be able to switch back and forth so that there isn't a whole lot of local lighting taking up resources all the time. Thank you for wracking your grains regardless. If I happen on the answer, I'll post it here... if someone else realizes I'm missing something, thank you very very much for the answer. 
_____________________
-GLX
When you don't know what's possible, anything is...
|
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
|
10-25-2005 01:31
It's an attachment ? You can't use PRIM_TYPE and PRIM_MATERIAL in calls to llSetPrimitiveParams on an attachment, AFAIK.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
|