|
Dominique Laville
Registered User
Join date: 24 Apr 2008
Posts: 84
|
06-10-2008 03:40
Hi,
how can I get the name of the avatar who is touching my object ?
If i have a object with a touch_start method, can I get the name of the avatars who touched my object ?
If it is not possible, how I could do it ?
thanks
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
06-10-2008 03:55
Try this: touch_start(integer num_detected) { llWhisper( PUBLIC_CHANNEL, llKey2Name( llDetectedKey(0) )); }
It is NOT a complete script! Include it in your default state or another state. Happy scripting
_____________________
From Studio Dora
|
|
Winter Ventura
Eclectic Randomness
Join date: 18 Jul 2006
Posts: 2,579
|
06-10-2008 03:57
llDetectedName(0) Or you can use llKey2Name(llDetectedKey(0)) This *IS* a complete script: default { touch_start(integer total_number) { llSay(0, "\n" + "Name: " + llDetectedName(0) + "\n" + "Key: " + (string)llDetectedKey(0) + "\n" + "Postion: " + (string)llDetectedPos(0) + "\n" + "Rotation: " + (string)llDetectedRot(0) ); } } Sample output: [3:55] Object: Name: Winter Ventura Key: 145b5e86-fcb2-4351-877a-0dfe65e80518 Postion: <91.16980, 90.34570, 600.77008> Rotation: <0.00000, 0.00000, 0.42074, 0.90718>
_____________________
 ● Inworld Store: http://slurl.eclectic-randomness.com ● Website: http://www.eclectic-randomness.com ● Twitter: @WinterVentura
|