|
FILETE Homewood
Registered User
Join date: 17 May 2007
Posts: 61
|
04-17-2008 09:33
Hi there! Let me just say , I don´t know much about SL Scripting, but I´ve manage to made a mailbox that when avatar touch it , it gives a notecard and whispers a message with instructions.
I would like to be able to put the avatar name on that message, like (Hello "Avatar name"! Fill this notecard and drop it on the mailbox).
Can someone guide me, what code should I put on the middle of the message so it returns the Avatar name?
Thanks so much!
|
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
04-17-2008 09:34
From: someone llSay(0, "Hello, " + llKey2Name(llDetectedKey(0)) + "! Fill this notecard and drop it on the mailbox"  ; That should do it, but can only be used in touch events (Sounds like you're using one), collision, and a couple others. For this though, you should be fine. (Its the llDetectedKey() that has the restriction)
_____________________
Tutorials for Sculpties using Blender! Http://www.youtube.com/user/BlenderSL
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
04-17-2008 09:55
Also, the previous poster didnt mention it, but be sure to put it in the touch_start() event. Also, it's easy to use llDetectedName(), and predefine it for readability as in... string avatar = llDetectedName(0); llSay (0,"Hello " + avatar + ", Please fill out this notecard and drop it in the mailbox."  ;
|
|
FILETE Homewood
Registered User
Join date: 17 May 2007
Posts: 61
|
04-17-2008 10:26
Thanks so much both of you! It worked great! 
|