Difference between revisions of "LlSetSitText"

From Second Life Wiki
Jump to navigation Jump to search
(We generally do not go through and change the whitespace of scripts unless its ugly. On the wiki we accept only K&R and Allman style (but not others) http://en.wikipedia.org/wiki/Indent_style)
m (Replaced old <LSL> block with <source lang="lsl2">)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL_Function
{{Issues/SVC-4870}}{{LSL_Function
|func_id=242|func_sleep=0.0|func_energy=10.0
|func_id=242|func_sleep=0.0|func_energy=10.0
|func=llSetSitText|p1_type=string|p1_name=text
|func=llSetSitText|p1_type=string|p1_name=text
|func_footnote
|func_footnote
|func_desc=Displays '''text''' rather than the default "Sit Here" in the pie menu
|func_desc=Displays '''text''' rather than the default "Sit Here" in the right-click menu.
|return_text
|return_text
|spec=
|spec=
The '''text''' is limited to 9 characters. A tab (\t) counts as 4 characters. The newline character (\n) will count as 1 character, though it is a bit of a waste, as it will have no effect on how the text is displayed. Aside from counting toward the limit, it will otherwise be ignored.
|caveats=*'''Text''' will only be displayed if set by a script calling this function in the root. If '''text''' is set by a script in a child the '''text''' will only be displayed after unlinking it or relinking it as the root. If either a child or the root is selected as an individual prim and right clicked, the '''text''' displayed will be the default even if a script in the root has set '''text'''. More simply - The '''text''' property displayed on right click will always be that of the root unless, right clicking a prim under individual edit when it will always be the LL default.
 
*Note that like particles, and the other set text functions, all '''text''' set via llSetSitText becomes a property of a  prim, not a script. For that reason, the '''text''' will remain if the script that set it is deactivated or even removed.
Note that like particles, and the other set text functions, all text set via llSetSitText becomes a property of a  prim, not a script. For that reason, the text will remain if the script that set it is deactivated or even removed.
*You have no control over the face, size or colour of the displayed '''text'''.
 
*'''Text''' is limited to 9 characters.
You have no control over the face, size or colour of the displayed text.
|examples=
 
===Usage===
===Usage===


<lsl>default
<source lang="lsl2">default
{
{
     state_entry()
     state_entry()
Line 20: Line 19:
         llSetSitText("Be Seated");
         llSetSitText("Be Seated");
     }
     }
}</lsl>
}</source>


=== Removing Sit Text ===
=== Removing Sit Text ===
Line 27: Line 26:
To remove custom text that you have placed there, set the text as an empty string like this: "".
To remove custom text that you have placed there, set the text as an empty string like this: "".


<lsl>default
<source lang="lsl2">default
{
{
     state_entry()
     state_entry()
Line 33: Line 32:
         llSetSitText("");
         llSetSitText("");
     }
     }
}</lsl>
}</source>


Upon your having done so, the text that appears will revert to "Sit Here."
Upon your having done so, the text that appears will revert to "Sit Here."
Line 45: Line 44:
|also_articles
|also_articles
|notes
|notes
|permission
|negative_index
|cat1=Pie Menu
|cat1=Pie Menu
|cat2=Prim
|cat2=Prim

Latest revision as of 13:03, 22 January 2015

Summary

Function: llSetSitText( string text );
0.0 Forced Delay
10.0 Energy

Displays text rather than the default "Sit Here" in the right-click menu.

• string text

Caveats

  • Text will only be displayed if set by a script calling this function in the root. If text is set by a script in a child the text will only be displayed after unlinking it or relinking it as the root. If either a child or the root is selected as an individual prim and right clicked, the text displayed will be the default even if a script in the root has set text. More simply - The text property displayed on right click will always be that of the root unless, right clicking a prim under individual edit when it will always be the LL default.
  • Note that like particles, and the other set text functions, all text set via llSetSitText becomes a property of a prim, not a script. For that reason, the text will remain if the script that set it is deactivated or even removed.
  • You have no control over the face, size or colour of the displayed text.
  • Text is limited to 9 characters.

Examples

Usage

default
{
    state_entry()
    {
        llSetSitText("Be Seated");
    }
}

Removing Sit Text

There is no way to stop a pie menu from having a "Sit Here" space reserved on it. Although by setting the string to a space no text will be shown.

To remove custom text that you have placed there, set the text as an empty string like this: "".

default
{
    state_entry()
    {
        llSetSitText("");
    }
}
Upon your having done so, the text that appears will revert to "Sit Here."

See Also

Functions

•  llSitTarget
•  llSetTouchText

Deep Notes

Signature

function void llSetSitText( string text );