Skip to content
lsl.devlsl.devLSL Dev

llSetTouchText

function
Function syntax
llSetTouchText(
  1. string text// Context menu text to display.
);
Energy
10

Displays text rather than the default “Touch” in the right-click menu

This is very similar to LlSetSitText.

To restore the default value, use an empty string for text.

To make it appear as if there is no text, use some combination of whitespace characters for text.

How to use
llSetTouchText("");
  • 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 llSetTouchText 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 characters1.
Example 1
default
{
state_entry()
{
llSetTouchText("Touch me!");
}
touch_start(integer detected)
{
llSay(0, "you touched me!");
}
}
  • SVC-4870: llSetSitText does not apply for child prims, only the main prims sit text gets displayed
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.

From the Second Life Wiki

Community documentation adapted from LlSetTouchText, by Linden Research, Inc. and contributing residents.View contributors and history.

Imported wiki revision:

Licensed under CC BY-SA 3.0. Last wiki edit: .Formatting and links have been adapted for this site; API metadata follows the LSL definitions.

  1. This function also accepts the UTF-8 character set, in which case the number of displayed characters may be even less than 9 ASCII characters ↩