|
Terrox Eracktor
Registered User
Join date: 6 Nov 2007
Posts: 1
|
03-05-2009 09:03
I'm slightly new at creating scripts and I'm a little confused with this one..
Is there a way to make a script, put it in a prim, and when any avatar clicks it, it will whisper, "object has been clicked by <Avatar's name>". This way I can see who has clicked the object. Thanks.
|
|
Destiny Niles
Registered User
Join date: 23 Aug 2006
Posts: 949
|
03-05-2009 09:04
Yes
|
|
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
|
03-05-2009 09:06
Use the touch_start event.
Call llWhisper to print the message, and llGetDetectedName to find the name of the avatar who clicked.
|
|
Papalopulus Kobolowski
working mind
Join date: 11 Aug 2006
Posts: 326
|
03-05-2009 09:09
|
|
WhiteStar Magic
Build it+Script it=RUN!
Join date: 24 Jul 2008
Posts: 36
|
Spam Free Version & Method
03-05-2009 09:23
Here is a Little Script which will do what you wish without spamming out to others. We have enough chatter & noise as it is. // script start, copy from here to bottom key kOwner; integer TellOwner = TRUE; // Set to FALSE to say something to the Toucher default { state_entry() { kOwner - llGetOwner(); } touch_start(integer total_number) { if(TellOwner) // This is TRUE so tell the owner { llInstantMessage(kOwner,llDetectedName(0)+" Touched me, I feel so Used ! "  ; } else // This is FALSE so complain to the Toucher! { llInstantMessage(llDetectedKey(0), "You Touched me ! Why does everyone want to do that ?"  ; } } } // === End of Script
_____________________
Build it, Script it & Enjoy It, then Share it !!!
|
|
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
|
03-05-2009 09:39
From: Terrox Eracktor Is there a way to make a script, put it in a prim, and when any avatar clicks it, it will whisper, "object has been clicked by <Avatar's name>". This way I can see who has clicked the object. Thanks. Yes: default { touch_start(integer total_number) { llWhisper( PUBLIC_CHANNEL, "object has been clicked by "+llDetectedName(0)); } }
_____________________
From Studio Dora
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-05-2009 10:30
Study the scripts that Dora and WhiteStar offered, and compare them to the basic "Hello, Avatar!" script that LL creates for you if you click the New Script button in inventory or on the Contents page of your Edit tool. It looks like this ... default { state_entry() { llSay(0, "Hello, Avatar!"); } touch_start(integer total_number) { llSay(0, "Touched."); } }
That basic script is about as simple as they come, so it's a nice place to start if you are learning to script. In fact, take a look at the tutorial at  , which starts there and builds on it to help you do exactly the sort of thing you just asked about. You might also want to visit the Linden Script Tutorial Exhibition at  . Their exhibition includes good working examples and it offers Thinc book versions of tutorial materials you can take away with you for later study.
|