Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Getting key of prim texture?

Plenipotientiary Extraordinaire
Registered User
Join date: 1 Jul 2004
Posts: 63
12-27-2004 07:16
Okay. Relative newbie at LSL here.
A friend gave me a script that swaps two textures based on their keys. The original implementation passes a linked message that activates one texture or the other on a prim face. This is exactly what I want to do.

Unfortunately, she isn't on so I can't ask her.

How do I get the key of a texture? The wiki says if I use llGetTexture it will return the name of the texture if it is in my inventory - which is the case.

I need the KEY so I can stick that into my script in order to sell it.

Thanks for you assistance in advance. :)
Ezhar Fairlight
professional slacker
Join date: 30 Jun 2003
Posts: 310
12-27-2004 07:54
CODE
key foo = llGetInventoryKey("Pink stripes with yellow dots"); // or whatever the texture in the objects inventory is called
_____________________
Ardith Mifflin
Mecha Fiend
Join date: 5 Jun 2004
Posts: 1,416
12-27-2004 07:55
Go into your inventory and then right click on the texture which you want. Select copy asset ID. This will copy the key of the texture to your clipboard. Paste this into your script, and you're golden.
Plenipotientiary Extraordinaire
Registered User
Join date: 1 Jul 2004
Posts: 63
12-27-2004 08:23
Thanks to both of you.

I tried both methods and got what I needed.