This from Viwoma:

I have a titler, one of those things that lets other people change the hovertext above your head, and when it speaks the text isnt prefixed with the object name, as with most objects. Its heard by everyone around you (so, probably llSay()) but its not the usual trick of changing the object name, because there is no colon (:) anywhere in the text which normally follows the object name, regardles of what it has been set to. Any ideas?

The trick she’s referring to, which I think of as “clean speak,” is a nice way to do object feedback without the mildly ugly object: statement text (”Luc’s Scripted Whatnot (verson 1.2a): I like monkeys!”).

Here’s a quick function snippet demonstrating this technique:

CleanSay(string message) {
     string name = llGetObjectName();
     list message_list = llParseString2List(message,[" "],[]);
     string subject = llList2String(message_list,0);
     integer start = llSubStringIndex(message,subject) + llStringLength(subject);
     string predicate = llGetSubString(message,start,-1);
     if(llGetListLength(message_list) == 1) predicate = " ";
     llSetObjectName(subject);
     llSay(0,"/me"+predicate);
     llSetObjectName(name);
}

Note that several of the lines in this function aren’t strictly necessary; you don’t really need to define quite that many local variables. I’ve done it so that it’s easier to see what the purpose of each step is. Also note that when possible, it’s better to hold the name of the object as a global variable rather than holding it locally in the function. In theory, using it locally should be fine, but tasks have a way of occasionally stacking up, and if you’re calling this function multiple times you just might end up with an object named “Hello.”

You can replace llSay with any “speaking” function (llWhisper, llOwnerSay, llShout, etc.). In fact, this is a particularly useful way to get rid of the “whispers” part of a chat line (”Luc’s Scripted Whatnot (verson 1.2a) whispers: I like monkeys.”). This works with shout, too, but please use llShout sparingly, because it’s really annoying when objects shout.

As of 1.23, I wouldn’t recommend using this for llInstantMessage. This version of the client makes the object name in an instant message a clickable link, so it looks kind of silly. There are ways around this, but none really worth using; it’s better to simply reserve this feature for the chat and owner-speak functions listed above.