Jump to content

Cant add username into string


MilesValentine
 Share

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

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

Recommended Posts

Name that the gift is intended for replaced with XXX in the interest of privacy.

Here is the intended effect of the script:

Someone clicks XXX hoof. It shows a message that (insert thier username here) kissed his hoof as a polite gesture. Username of clicker, action...upon click. It goes inside an invisible sphere, he wears on his hooves.

Here is what I have:

default
{
    touch_start(integer total_number)
    {
    llSay(0, "kisses XXX adorable hoof in awe of his fabulousness.");

    }
}


It's a barely modified copy of a very basic script. But there is no name at the begining. I've spent the whole day trying to find out how to add the username at the begining and still havent managed it. It's just a silly little gift and I dont want to give up on it.

Link to comment
Share on other sites


Rolig Loon wrote:

Oh.  I never use display names, so I tend to ignore them.  If you want to show a display name, though, just use

llGetDisplayName(llDetectedKey(0))

instead of

llDetectedName(0)

I really would question this policy, Rolig.   I've used llGetDisplayName in preference to llDetectedName() since a few months after display names were introduced (essentially as soon as the initial teething problems were fixed and it stopped returning "????" half the time) for most purposes -- not access lists and so on, obviously, but when the object is speaking to people -- on the argument that if someone's taken the trouble to set a display name, that's presumably what they want to be called.

I've had no complaints, but I have had a lot of positive feed-back from people who are so pleased when scripted items call them "John Smith" rather than "john12345 Resident.."

Link to comment
Share on other sites

Hehe.. That's not what I meant.  I don't use display names myself and I have them turned off for other people because I can't keep track of who they are otherwise.  So, when the OP asked specifically about how to make the "username" appear in the message, I therefore took him literally.  Because I don't use display names myself, it hadn't occurred to me that he meant to say "display name" when he said "username".  Otherwise, I might have given a more generic solution.  :smileywink:

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3574 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...