Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Object Keys?

Talulah Bancroft
Questionable Content
Join date: 16 Aug 2004
Posts: 8
11-04-2004 14:59
:D Okay, this should be an easy enough question for all you scripting gurus out there...
Whats the easiest way to find the key of an object?
I see in a lot of particle scripts where is has the target option that you can put self or owner or the key of an object... I've looked in several other places and even read some of the various guides but i cant seem to find what I'm looking for... I've also asked in-game but they usually spit some uber scripting mumbo jumbo at me and all i can respond with is O,o? :eek: :confused: I'd GREATLY appreciate any help thats offered here and would like to say Thank You! in advance

=^,^= Talulah Bancroft =^,^= :D
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
11-04-2004 15:11
The easiest way to get the key of an object is, I'm afraid, a script, but it's not hard.

Edit the object, go to the "Contents" tab and click "New Script"
Delete the default script and copy in:
CODE

default
{
state_entry()
{
llSay(0, "My Key is "+ llGetKey());
}
}
_____________________
Sarcasm meter:
0 |-----------------------*-| 10
Rating: Awww Jeeze!
Zuzi Martinez
goth dachshund
Join date: 4 Sep 2004
Posts: 1,860
11-04-2004 15:11
the wiki says llGetKey() gets the current key of the prim containing the script.
Talulah Bancroft
Questionable Content
Join date: 16 Aug 2004
Posts: 8
11-04-2004 15:19
It tells me theres an error in this part of the script

());

right after GetKey

Error: Type Mismatch

haha and since im not a scripter i have no clue how to fix it


~~so as to not take up space spamming lol HI YA TIGER haha~~
_____________________
"Perseverance against all opposition. Crushing all limitations. Pure strength through solitude. Disclipline and determination."
~Hatebreed
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
11-04-2004 15:20
I have a script with a known name. When I drag and drop it into an object, it says the key and then removes itself from the object. Very handy. I have several one-shot scripts like that.
_____________________
~ Tiger Crossing
~ (Nonsanity)
Yoshi Platini
Registered User
Join date: 23 Jul 2004
Posts: 111
11-04-2004 15:52
From: Talulah Bancroft
It tells me theres an error in this part of the script

());

right after GetKey

Error: Type Mismatch

haha and since im not a scripter i have no clue how to fix it





Try this instead:

default
{
state_entry()
{
llSay(0, "My Key is "+ (string)llGetKey());
}
}


- yoshi
Talulah Bancroft
Questionable Content
Join date: 16 Aug 2004
Posts: 8
11-04-2004 15:55
~MMMMMUUUAAAHHHH~~
Thank you all soooo much hahaha
now... i am unstoppable!!!!!! :D
_____________________
"Perseverance against all opposition. Crushing all limitations. Pure strength through solitude. Disclipline and determination."
~Hatebreed
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
11-05-2004 07:38
From: Yoshi Platini

llSay(0, "My Key is "+ (string)llGetKey());

Oops, yeah. These forums need an LSL compiler!
:)
_____________________
Sarcasm meter:
0 |-----------------------*-| 10
Rating: Awww Jeeze!