Gattz Gilman
Banned from RealLife :/
Join date: 29 Feb 2004
Posts: 316
|
02-25-2005 11:17
i was trying to have a script set the texture to a side of a prim, then do llGetTexture(side_of_prim) and link message the key to another linked prim, and have it show the texture. But i found out that if the texture is in the contents of the prim asking llGetTexture, then it will just return the name of the texture, and if the texture is not in the contents, then it will return key.
My problem is i need the texture in the contents, but i need to get the key. Any ideas?
|
McWheelie Baldwin
Registered User
Join date: 9 Apr 2004
Posts: 154
|
02-25-2005 11:30
From: Gattz Gilman i was trying to have a script set the texture to a side of a prim, then do llGetTexture(side_of_prim) and link message the key to another linked prim, and have it show the texture. But i found out that if the texture is in the contents of the prim asking llGetTexture, then it will just return the name of the texture, and if the texture is not in the contents, then it will return key.
My problem is i need the texture in the contents, but i need to get the key. Any ideas? You can use something like this.... llGetInventoryKey( llGetInventoryName(INVENTORY_TEXTURE, 0) );
This will return the key of the first texture in the object's contents. One thing to note, if you don't have mod permission on the texture, I believe NULL_KEY is returned. I will have to double check this, but I am pretty sure that is the case. McW
|