Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Changing texture or color on all linked objects

Patrick Playfair
Registered User
Join date: 19 Jul 2004
Posts: 328
02-19-2005 12:13
Is there a way to change textures on ALL linked prims in an object. eg: change all prims to texture1, then 20 seconds later change all to texture2. Also is there a way to do the same with colors? So far I have only gotten this to work on the root prim.

Thanks

:D
_____________________
The meek shall inherit the earth (after I'm through with it).

Patrick Playfair
Rhombur Volos
King of Scripture & Kebab
Join date: 6 Oct 2004
Posts: 102
02-19-2005 12:30
Textures: Nope. You need a separate script in each object.
Color: use llSetLinkColor
( http://secondlife.com/badgeo/wakka.php?wakka=llSetLinkColor )
Jimmy Loveless
Hello, avatar!
Join date: 1 Oct 2004
Posts: 35
02-19-2005 12:33
Patrick,
You must put a copy of every texture in every child prim's inventory, then you can send a link message to the linkset instructing each prim which texture to set. Of course this means that in addition to all the textures you need a script in each child prim that receives the linkmessage and sets the texture. Sucky, huh?

Best,
JL
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
02-19-2005 12:49
Yeah, currently the only way to modify prims externally is using Jimmy's method. I made a feature suggestion asking for more control though:
llSetLinkPrimitiveParams
McWheelie Baldwin
Registered User
Join date: 9 Apr 2004
Posts: 154
02-19-2005 13:14
From: Jimmy Loveless
Patrick,
You must put a copy of every texture in every child prim's inventory, then you can send a link message to the linkset instructing each prim which texture to set. Of course this means that in addition to all the textures you need a script in each child prim that receives the linkmessage and sets the texture. Sucky, huh?

Best,
JL


This isn't entirely accurate. You don't need to have a copy of the texture in each prim if you pass the texture UUID (key) via link messages. If you have mod permissions on the textures, you put a single copy in the root prim, then loop through the textures in the contents and grab the key for each, using llGetInventoryKey(). Another option is to create a hard coded list of texture keys, then you don't have to even have a copy of the textures in the root prim. If you own the textures, you can get the key by finding it in your inventory and right clicking on it and selecting Copy UUID. Then you can past that into your control script. The script in each prim would then watch for the link messages and set the texture to the key part of the message.

McW
_____________________


Patrick Playfair
Registered User
Join date: 19 Jul 2004
Posts: 328
In sync?
02-19-2005 20:27
If I used the methods listed above, would they all change in sync? Or would some be ahead or behind the others?

Also, not much of a scripter, anyone want a job? LOL

Thank you all, will play around ith it :)
_____________________
The meek shall inherit the earth (after I'm through with it).

Patrick Playfair
Patrick Playfair
Registered User
Join date: 19 Jul 2004
Posts: 328
???
02-19-2005 20:29
Does that mean that each piece has a listen script in it? (the ones that are bad for you LOL)
_____________________
The meek shall inherit the earth (after I'm through with it).

Patrick Playfair
Rhombur Volos
King of Scripture & Kebab
Join date: 6 Oct 2004
Posts: 102
02-19-2005 20:40
link messages, aren't the same as llSay/shout/whisper-messages.


http://secondlife.com/badgeo/wakka.php?wakka=llMessageLinked
/54/44/34947/1.html <- not entirely objective, and probably not very accurate, but still good reading.

Please stop abusing that acronym.. It makes me feel bad about helping you.
Patrick Playfair
Registered User
Join date: 19 Jul 2004
Posts: 328
Thanks for your help
02-20-2005 09:08
Thanks for your help everyone. I have managed to put together a script that now changes textures on 12 linked prims at a specified interval.
_____________________
The meek shall inherit the earth (after I'm through with it).

Patrick Playfair
Jimmy Loveless
Hello, avatar!
Join date: 1 Oct 2004
Posts: 35
02-28-2005 12:47
thanks McWheelie, I had no idea!! that is a lot smoother.
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
03-01-2005 12:19
From: Jimmy Loveless
Patrick,
You must put a copy of every texture in every child prim's inventory, then you can send a link message to the linkset instructing each prim which texture to set. Of course this means that in addition to all the textures you need a script in each child prim that receives the linkmessage and sets the texture. Sucky, huh?

Best,
JL

If you do NOT want to use the actual texture in each prim, use the key of the texture.
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts