• 20Aug

    Consider the following LSL script:

    default
    {
    state_entry()
    {
      llSay(0,"Hello, Avatar!");
      llOwnerSay("Hello, Avatar!");
      // edit: fixed erroneous argument in previous line. Thanks MP!
      llInstantMessage(llGetOwner(),"Hello, Avatar!");
    }
    }

    Drop that script into a prim and run it. Three lines of chat will appear for the owner:

    Object: Hello, Avatar!
    Object: Hello, Avatar!
    Object: Hello, Avatar!

    Three forms of chat available to scripted objects show up exactly the same! (The other two, shout and whisper, can be distinguished from all others.) But of these three forms of chat, only one can be heard by other people. What gives?

    This issue comes up with scripted objects which use chat to report something to the owner. Sometimes these scripts use llSay when they should instead use llOwnerSay. (If your script does this, it is a naughty script that should be publicly flogged. I’m looking at you, “MultiGadget by Timeless Prototype”! For shame!) Being the considerate person that I am, I do not want to use an object which will spam everyone around me, but I cannot determine at a glance which method of communication the object is using.

    Every form of visible object communication should be easily distinguishable from every other form, at a glance. The results of the script should show up as something like this:

    Object: Hello, Avatar!
    [Own] Object: Hello, Avatar!
    [IM] Object: Hello, Avatar!

    Not only would each form have different text boilerplate, but they could use different colors (which could be changed in your preferences, of course). The Grid would be a much less ambiguous place to live in, and that’s a good thing.


    Since we don’t have that yet, I will point out for the benefit of my readers that you can tell if an object is spamming the general chat channel by using another object which has been scripted to repeat to you everything which is said on channel 0. Here is a script that should do the job (pending actual testing in SL):

    default
    {
    state_entry()
    {
      llListen(0,"",NULL_KEY,"");
    }
    
    listen( integer channel, string name, key id, string message )
    {
      llOwnerSay( name + " said: " + message );
    }
    }

    To my knowledge, it remains impossible by any means (short of packet sniffing, which may or may not violate the Terms of Service) to tell the difference between llOwnerSay and sending an instant message to the owner.


    Posted by Jacek Antonelli @ 11:26 pm

3 Responses

WP_Cloudy
  • Timeless Prototype Says:

    The Multi Gadget advert can be disabled by its owner by saying ‘cmd|advert|off’. That is to say it is the choice of the owner. Everything else is an IM or OwnerSay, except for the “key getter” feature which is deliberately a whisper because you might be getting keys for a friend to use.

    I like your idea of prefixing what is said with [Own] or [IM]. Here’s how that can be achieved by your LSL script:

    myOwnerSay(string message)
    {
    string preserveName = llGetObjectName();
    llSetObjectName(”[Owner] ” + preserveName);
    llOwnerSay(message);
    llSetObjectName(preserveName);
    }

  • Erbo Evants Says:

    I know I’ll definitely turn that off on my copy of the MG…I just wonder if the setting “sticks” when the MG is detached and reattached (which is basically every time I change outfits). Perhaps I’ll need to make a gesture that issues that command to the MG that I can use whenever needed.

  • Mera Says:

    You already know this, but llOwnerSay doesn’t take a channel as the first example shows.

    *waves to timeless*