Difference between revisions of "LlSetTouchText"

From Second Life Wiki
Jump to: navigation, search
m (grammer and punctuation)
Line 4: Line 4:
 
|func_id=241|func_sleep=0.0|func_energy=10.0
 
|func_id=241|func_sleep=0.0|func_energy=10.0
 
|p1_type=string|p1_name=text
 
|p1_type=string|p1_name=text
|func_footnote='''text''' is limited to 9 characters.<br/>Changing the text does not effect the behavior.
+
|func_footnote=
|func_desc=Displays '''text''' in pie menu rather than "Touch"
+
|func_desc=Displays '''text''' rather than the default "Touch" in the pie menu
 
|return_text
 
|return_text
|spec
+
|spec=
|caveats
+
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.
|constants
+
 
|examples=<lsl>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.
{
+
 
     state_entry()
+
You have no control over the face face, size or colour of the displayed text.
    {
+
 
 +
 
 +
==Usage==
 +
<lsl>default{
 +
     state_entry(){
 
         llSetTouchText("Touch me!");
 
         llSetTouchText("Touch me!");
 
     }
 
     }
     touch_start(integer detected)
+
     touch_start(integer detected){
    {
+
 
         llSay(0, "you touched me!");
 
         llSay(0, "you touched me!");
 
     }
 
     }
 
}</lsl>
 
}</lsl>
 +
 +
 +
== Removing Touch Text ==
 +
There is no way to stop a pie menu from having a "Touch" space reserved on it.
 +
 +
To remove custom text that you have placed there, set the text as space: "&nbsp;".
 +
 +
<lsl>default{
 +
    state_entry(){
 +
        llSetTouchText(" ");
 +
    }
 +
}</lsl>
 +
 +
Upon your having done so, the text that appears will revert to "Touch."
 +
 +
 +
 +
|caveats
 +
|constants
 
|helpers
 
|helpers
 
|also_functions=*{{LSLG|llSetSitText}}
 
|also_functions=*{{LSLG|llSetSitText}}

Revision as of 17:34, 7 July 2008

Summary

Function: llSetTouchText( string text );

Displays text rather than the default "Touch" in the pie menu

• string text

Specification

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.

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 face, size or colour of the displayed text.


Usage

<lsl>default{

   state_entry(){
       llSetTouchText("Touch me!");
   }
   touch_start(integer detected){
       llSay(0, "you touched me!");
   }

}</lsl>


Removing Touch Text

There is no way to stop a pie menu from having a "Touch" space reserved on it.

To remove custom text that you have placed there, set the text as space: " ".

<lsl>default{

   state_entry(){
       llSetTouchText(" ");
   }

}</lsl>

Upon your having done so, the text that appears will revert to "Touch."

Examples

See Also

Functions

Articles

Deep Notes

Search JIRA for related Issues

Signature

function void llSetTouchText( string text );