Difference between revisions of "LlSetTouchText"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m |
m |
||
Line 15: | Line 15: | ||
**The byte count for each Unicode character is equal to the number of bytes needed to represent it in UTF-8. | **The byte count for each Unicode character is equal to the number of bytes needed to represent it in UTF-8. | ||
|examples= | |examples= | ||
<lsl>default{ | <lsl>default | ||
state_entry(){ | { | ||
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!"); | ||
} | } |
Revision as of 22:31, 13 May 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: llSetTouchText( string text );241 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Displays text rather than the default "Touch" in the pie menu
• string | text |
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.
Caveats
- The text is limited to 9 bytes.
- A tab (\t) counts as 4 bytes (four spaces).
- The newline character (\n) will count as 1 byte, but will have no effect on how the text is rendered (so don't use it).
- The byte count for each Unicode character is equal to the number of bytes needed to represent it in UTF-8.
Examples
<lsl>default {
state_entry() { llSetTouchText("Touch me!"); } touch_start(integer detected) { llSay(0, "you touched me!"); }}</lsl>