Difference between revisions of "MySayOwner"

From Second Life Wiki
Jump to navigation Jump to search
(minor readability changes)
Line 9: Line 9:
|func_footnote=
|func_footnote=
<lsl>
<lsl>
mySayOwner(string objectName, string msg) {
mySayOwner(string objectName, string msg)
     string name = llGetObjectName();
{
     string nameBeforeChange = llGetObjectName();
 
     llSetObjectName(objectName);
     llSetObjectName(objectName);
     llOwnerSay("/me " + msg);
     llOwnerSay("/me " + msg);
     llSetObjectName(name);
 
     llSetObjectName(nameBeforeChange);
}
}
</lsl>
</lsl>

Revision as of 12:04, 30 September 2012

Summary

Function: string mySayOwner( string objectName, string msg );

Like mySay but spoken to object owner only. Cleaner chat on a user's screen. Gives a less-cluttered, more professional looking output.
Returns a string

• string objectName
• string msg

<lsl> mySayOwner(string objectName, string msg) {

   string nameBeforeChange = llGetObjectName();
   llSetObjectName(objectName);
   llOwnerSay("/me " + msg);
   llSetObjectName(nameBeforeChange);

} </lsl> See also: mySay, Category:LSL_Chat

Examples

<lsl> mySayOwner("","Processing, please wait."); </lsl> //The owner sees just: 17:04 Processing, please wait.

//You don't need to specify anything in the first parameter. The second one is limited to the normal chat limitation of a maximum of 255 bytes for that string. You may if you wish in the function swap in llWhisper or llShout.

Notes

What this does:

Instead of users having their vision obscured by text like this covering half their screen:

[14:04] Animated Living Sofa Combo Couple & Solo 2.1e whispers: Lie F 1

They see just this:

[14:04] Lie F 1