Jump to content

llGetUsername(llDetectedKey(0)) working on attach(key id) ?


Bull Vita
 Share

You are about to reply to a thread that has been inactive for 1641 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello everyone,

I'm trying to script an object that will say something with the Name of whom attach that object....Example:

default
{
    attach(key id)
    {
        if (id)     
        {
            llSay(0, "I have been attached!" + llGetDisplayName(llDetectedKey(0)));
        }
        else
        {
            llSay(0, "I have been detached!" + llGetDisplayName(llDetectedKey(0)));
        }
    }
}

 

But that won't work on attach....  is there a way that I can make it work?

Thanks for the help!

Link to comment
Share on other sites

Yeah, the attach event doesn't bind the llDetected* values, but a common approach is to use llGetOwner() instead because an attachment is always owned by the agent to whom it's attached.

(That's not necessarily a good thing, especially because it means temp-attached objects must be transferable, but it's unlikely to change because so much depends on it now.)

  • Like 2
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1641 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...