|
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
|
09-19-2006 01:23
I have one object that I made, which has eight prims that each need to set a texture to one of three textures depending on the linkmessage from the control prim. For this I put a copy of each texture into each prim and am using llSetTexture
However, now I am working on another object where I'll have a lot more textures. (a variable amount of textures.) and I want to set a different texture on each of three prims.
I have seen in a couple scripts that you can pass a key to a texture instead of it's name to the llSetTexture so that the texture does not have to be in the current prim. I am wondering if it is possible then to pass the key to a texture maintained in the root prim to the child prim through a llMessageLinked and have it set ok?
I will have a notecard listing which textures to use when, by name. How would i get the key to a texture by it's name?
Thanks for the replies.
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
09-19-2006 01:52
It's certainly possible to do this, but only if you know the key because the creator will give it to you, or it's full permissions.
In the latter case find it in your inventory, right click it and choose "Copy UUID..." and paste it.
|
|
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
|
09-19-2006 02:36
if you have full permissions on the texture you can use llGetInventoryKey() to get the key of the texture, then pass that through the linked message. so your link message could look something like this string TEXTURE_NAME = llGetInventoryName(INVENTORY_TEXTURE, TEXTURE_ON); llMessageLinked(LINK_ALL_OTHERS, 100, TEXTURE_NAME, llGetInventoryKey(TEXTURE_NAME));
That's an example, but I assume that you have an idea of how to pass the stuff 
|
|
Aakanaar LaSalle
Registered User
Join date: 1 Sep 2006
Posts: 132
|
09-19-2006 12:13
yea, I'll have full control of the textures, as I will be making them.. and the names will be stored in a notecard along with other pertinant information..
I should be able to use llGetInventoryKey(name) for that. thanks.
Though now this will be interesting.. as i'll be setting three textures. one for center screen and one each for the two side screens. i could send three linked messages with different integers for each screen, or i wonder if i can send the three keys as a CSV string and have each screen grab the one it wants.
Thanks, i'll play around with this. Appreciate the help
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
09-19-2006 14:02
Yes, but, although not tested my strong suspicion is 3 link messages one to each prim is faster and less load than one message to all and parsing it.
|