Difference between revisions of "MySayOwner"
Jump to navigation
Jump to search
(New page: {{LSL_Function |mode=user |func=mySayOwner |p1_type=string|p1_name=objectName |p2_type=string|p2_name=msg |return_type=string |return_text= |func_desc=Like mySay but spoken to object owner...) |
m (<lsl> tag to <source>) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 8: | Line 8: | ||
|func_desc=Like mySay but spoken to object owner only. Cleaner chat on a user's screen. Gives a less-cluttered, more professional looking output. | |func_desc=Like mySay but spoken to object owner only. Cleaner chat on a user's screen. Gives a less-cluttered, more professional looking output. | ||
|func_footnote= | |func_footnote= | ||
< | <source lang="lsl2"> | ||
mySayOwner(string objectName, string msg) { | mySayOwner(string objectName, string msg) | ||
string | { | ||
string nameBeforeChange = llGetObjectName(); | |||
llSetObjectName(objectName); | llSetObjectName(objectName); | ||
llOwnerSay("/me " + msg); | llOwnerSay("/me " + msg); | ||
llSetObjectName( | |||
llSetObjectName(nameBeforeChange); | |||
} | } | ||
</ | </source> | ||
See also: [[mySay]], [[ | See also: [[mySay]], [[:Category:LSL_Chat]] | ||
|examples= | |examples= | ||
< | <source lang="lsl2"> | ||
mySayOwner("","Processing, please wait."); | |||
</ | </source> | ||
//The owner sees just: 17:04 Processing, please wait.<br /> | //The owner sees just: 17:04 Processing, please wait.<br /> | ||
//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. | //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. | ||
Line 42: | Line 45: | ||
|cat1=Examples | |cat1=Examples | ||
|cat2 | |cat2=User-Defined Functions | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} |
Latest revision as of 14:29, 22 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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 |
mySayOwner(string objectName, string msg)
{
string nameBeforeChange = llGetObjectName();
llSetObjectName(objectName);
llOwnerSay("/me " + msg);
llSetObjectName(nameBeforeChange);
}
See also: mySay, Category:LSL_Chat
Examples
mySayOwner("","Processing, please wait.");
//The owner sees just: 17:04 Processing, please wait.
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