|
VooDoo Bamboo
www.voodoodesignsllc.com
Join date: 4 Oct 2006
Posts: 911
|
02-24-2007 09:07
Ok I am really trying to hard to learn the scripting language in SL. I am not understanding something I keep running into. This whole key thing. I have seen things like this in script examples...
string CHART = "f2959ca0-6d05-e1df-7ced-aadc9e5e4022";
Now from what I can tell that telling it the graphic to use however I do not understand a few things...
1. How do you find the key for a texture? 2. Where is the texture stored then?
I hope I am asking this all right. A little confused.
Thanks for the help!
|
|
Ravanne Sullivan
Pole Dancer Extraordinair
Join date: 10 Dec 2005
Posts: 674
|
02-24-2007 09:38
The key is a direct referance to the texture in the SL database and allows you to specify something that is not in the objects inventory. To get the key of a texture in your inventory right click it and copy the UUID. For things not in your inventory you would need to get the UUID (key) from another source mostly from someone else who knows it.
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
02-24-2007 12:07
From: VooDoo Bamboo Ok I am really trying to hard to learn the scripting language in SL. I am not understanding something I keep running into. This whole key thing. I have seen things like this in script examples...
string CHART = "f2959ca0-6d05-e1df-7ced-aadc9e5e4022";
Now from what I can tell that telling it the graphic to use however I do not understand a few things...
1. How do you find the key for a texture? 2. Where is the texture stored then?
I hope I am asking this all right. A little confused.
Thanks for the help! 1. As was stated, right click the texture and copy the uuid, then paste into the code. 2. Where is the texture stored? Everything in SL is stored server side, or at Linden Lab's end. Everything, all objects, textures, etc, are stored specifically on the asset server (actually a large group of servers). Even everything in your inventory, and, your inventory itself, is stored server side. Pretty much the only thing stored on your computer is the client software and current settings, that's it. UUID Keys are reference numbers used to reference, well, everything. When you log on, your avatar is given a UUID Key, or each time you rez an object, or reference anything. Your objects don't actually get stored in your inventory, rather, your inventory is a directory of UUID keys that can retrieve what is stored "in your inventory". The actual object information that creates your object (or scripts, textures, other objects), within an obect is stored on the asset server, and, of course, is referenced with yet another UUID key. The disadvantage to this system is that you have to have the data transmitted each time you need something, but, it must be this way, because if someone else comes within range of an object rezzed by you, the data has to be server side so that it can be sent to the 3rd party.
|
|
VooDoo Bamboo
www.voodoodesignsllc.com
Join date: 4 Oct 2006
Posts: 911
|
02-24-2007 17:59
Thanks for the info. I will take a look at this when I log in. This clears up alot of my questions. Thanks!
|
|
Roland Francis
Registered User
Join date: 6 Jan 2007
Posts: 19
|
06-17-2007 08:25
Very well explained, thanks for that
Now an evident second question: how do you find a persons UUID?
|
|
Aliz Boa
fiesty
Join date: 18 May 2007
Posts: 22
|
06-17-2007 11:55
From: Roland Francis Very well explained, thanks for that
Now an evident second question: how do you find a persons UUID? Just type in their name http://www.moopf.com/name2key.php
|
|
Sin Poitier
RL is calling
Join date: 5 Mar 2007
Posts: 52
|
06-20-2007 08:03
Is there a key2name? I know you can get it if you have the avatar near you or if he/she touches a prim, but what if you never again see that avatar...you have the key and need to know who was.
_____________________
Me? No, i'm just part of your imagination.
C.I.G. CEO Jefe de "Chilenos en SL"
|
|
teddirez Escape
Virtual Steads GM
Join date: 21 Jul 2006
Posts: 14
|
07-03-2007 04:34
From: Sin Poitier Is there a key2name? I know you can get it if you have the avatar near you or if he/she touches a prim, but what if you never again see that avatar...you have the key and need to know who was. Im looking for the same thing.
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
07-03-2007 08:07
There may be a key2name webservice exposed somewhere, but in-world, when the agent in question isn't in the sim (for which case "llKey2Name()" would work), use "llRequestAgentData(agentKey, AGENT_NAME);" and get the result in a dataserver() event. It's generally worth trying llKey2Name first, because dataserver can be pretty slow.
|
|
Sammi Spectre
Registered User
Join date: 15 Sep 2005
Posts: 5
|
Getting an avatar name from a key - example
07-03-2007 08:11
From: Sin Poitier Is there a key2name? I know you can get it if you have the avatar near you or if he/she touches a prim, but what if you never again see that avatar...you have the key and need to know who was. you can get the name with llKey2Name(key) *if* the agent is in the same sim... http://wiki.secondlife.com/wiki/LlKey2NameIf they are long gone, you'll have do make a dataserver query, which is like reading a notecard. You send the query with llRequestAgentData(key, DATA_NAME) and if the name is available you will receive a reply via your dataserver() event handler. Here is a script to demonstrate this method: (Note: While bbcode is turned off, to copy this script with formatting intact, hit the Quote button below, and copy the parts between the php tags, then hit your browser back button to return to this page. // script demostrating the dataserver method of finding an avatar name from a key // key ID = "3d6181b0-6a4b-97ef-18d8-722652995cf1"; // the key to look up
key ID_REQUEST; // the key to identify the dataserver's reply as mine
default { state_entry() { ID_REQUEST = llRequestAgentData( ID, DATA_NAME ); llSetTimerEvent(10.0); // timeout in 10 seconds }
dataserver(key queryID, string data) { if (queryID == ID_REQUEST) { llSetTimerEvent(0); // stop timeout llOwnerSay("The key " + (string)ID + " belongs to " + data); } } timer() { llOwnerSay("Query timed out, perhaps the key is not a valid agent."); } }
|