<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Digimbyte+Resident</id>
	<title>Second Life Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.secondlife.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Digimbyte+Resident"/>
	<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/wiki/Special:Contributions/Digimbyte_Resident"/>
	<updated>2026-07-27T07:44:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlSetText&amp;diff=1199005</id>
		<title>Talk:LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlSetText&amp;diff=1199005"/>
		<updated>2016-01-30T00:08:50Z</updated>

		<summary type="html">&lt;p&gt;Digimbyte Resident: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== JIRA New Feature llGetText ==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a first draft. Good to go? Ready to add near http://jira.secondlife.com/secure/QuickSearch.jspa after logging in with the usual Second Life name &amp;amp; password? Yes/ no/ almost? -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 20:55, 1 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
PROJECT = MISC (chosen from VWR SVX WEB MISC Eventlet Mulib CertifiedHTTP)&lt;br /&gt;
&lt;br /&gt;
ISSUE TYPE = New Feature (chosen from Bug, New Feature)&lt;br /&gt;
&lt;br /&gt;
SUMMARY = A function named llGetText should exist to tell the script calling llSetText if the script is or is not changing the floating text of the prim.&lt;br /&gt;
&lt;br /&gt;
PRIORITY = Normal (chosen from Showstopper, Critical, Major, Normal, Small)&lt;br /&gt;
&lt;br /&gt;
COMPONENT/S = Unknown (chosen from Unknown, Miscellaneous)&lt;br /&gt;
&lt;br /&gt;
AFFECTS VERSION/S = Unknown (not editable)&lt;br /&gt;
&lt;br /&gt;
LINDEN LAB ISSUE ID = (intentionally left blank)&lt;br /&gt;
&lt;br /&gt;
ENVIRONMENT = N/A&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION =&lt;br /&gt;
&lt;br /&gt;
A function named llGetText should exist to tell the script calling llSetText if the script is or is not changing the floating text of the prim. For example, llGetText could return a list of four results: [text, color, alpha, font].&lt;br /&gt;
&lt;br /&gt;
This specific need to add llGetText to LSL illustrates a general design principle. LSL should define a way to get back everything it sets. Otherwise one script cannot discover if another script has set a property. For example, a script cannot see if an object has been labeled for sale, given a custom label, or given no label at all as its floating text. As another example, an instance of an editor script cannot show the operator if the operator has set the property thru another script instance.&lt;br /&gt;
&lt;br /&gt;
ATTACHMENT = None&lt;br /&gt;
&lt;br /&gt;
PATCH ATTACHED = (intentionally left blank)&lt;br /&gt;
&lt;br /&gt;
SOURCE VERSION = (intentionally left blank)&lt;br /&gt;
&lt;br /&gt;
== llGetText ==&lt;br /&gt;
&lt;br /&gt;
I think it should point to a JIRA feature suggestion but I&#039;m not feeling inspired enough to write one up. -- [[User:Strife Onizuka|Strife Onizuka]] 12:55, 29 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Thanks for making time to say so. I didn&#039;t know that. Now that I do, I&#039;ll volunteer me to research and then publish an article here that invites our audience to contribute to JIRA also. Writing up the JIRA entry for llGetText will be my first example, unless another among us beats me to it. -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 13:07, 29 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:[[User:Strife_Onizuka]] &amp;gt; http://wiki.secondlife.com/wiki/Category:Jira_Reporters &amp;gt; [[Bug Reporting 101]] may be relevant. -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 13:16, 29 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Wow that mess of a web of pages near [[Bug Reporting 101]] is nearly indecipherable.&lt;br /&gt;
&lt;br /&gt;
:http://jira.secondlife.com/secure/QuickSearch.jspa might be the first step that those too many words recommend. As of this moment, llSetText finds hits, llGetText finds no hits, confirming Strife&#039;s idea that we should add llGetText. -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 20:26, 1 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
I regret that there were so many edits, it&#039;s the first time I&#039;ve contributed content to this Wiki, and am still learning the formatting.  Thanks for understanding.  It would help if there were a generic page with the formatting already in place that users could edit -- there may be one somewhere, but I haven&#039;t found it yet.  -- [[User:Rich Nykvist|Rich]]&lt;br /&gt;
:Don&#039;t worry about the number of edits. Just look around at the syntax used on other pages, it&#039;s the easiest way. [[User:Strife Onizuka|Strife Onizuka]] 04:54, 8 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
: With the exception of editing actual template code (as opposed to code that uses templates), the &amp;quot;Show Preview&amp;quot; button will allow you to keep an eye on your changes without committing them to the article :-)&lt;br /&gt;
: [[User:SignpostMarv Martin|SignpostMarv Martin]] 05:36, 8 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Different colors in the displayed text? ==&lt;br /&gt;
&lt;br /&gt;
I recently saw some RPG engine that lets people have colored health bars in the hovertext above their head.&lt;br /&gt;
&lt;br /&gt;
Is there a way to specify colors for individual text characters, or are they doing this by stacking up several llSetText prims, each showing only one color? [[User:Scalar Tardis|Scalar Tardis]] 20:25, 25 March 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Stacking. -- [[User:Strife Onizuka|Strife Onizuka]] 15:19, 26 March 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== llSetText for storage ==&lt;br /&gt;
&lt;br /&gt;
Regarding the caveat &amp;quot;Do not rely on Floating Text as a storage medium; it is neither secure nor finalized.&amp;quot; I&#039;m wondering how necessary some of this is as a caveat anymore?&lt;br /&gt;
&lt;br /&gt;
I&#039;m not aware of the text limit for hover-text having changed in a long time, and even if it were to change that&#039;s an argument for checking that any stored data is the length you expect it to be (e.g- store expected length first). The main argument against storage is the lack of security, but the same is true of using prim descriptions, which are also commonly used for storage that can survive resets.&lt;br /&gt;
&lt;br /&gt;
I often use invisible set-text to store short pieces of persistent data that I need to survive resets (but which I&#039;m not concerned about being inspected), while leaving descriptions free for users to change manually (as I like to use descriptions for specifying prim-properties that a script can load, such as allowing a script to change all prims with the &amp;quot;primary&amp;quot; keyword). Obviously pushing the limits of either isn&#039;t a great idea, but short text should be fine in both so long as it&#039;s nothing sensitive, so I&#039;m wondering if the caveats should be updated to reflect that? The caveats for this page could probably use a cleanup in general actually, as things like clearing text could do with being in examples I think. --&#039;&#039;&#039;[[User:Haravikk_Mistral|Haravikk]]&#039;&#039;&#039; 01:58, 12 January 2016 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== New Information ==&lt;br /&gt;
Need to add a caveat about [[llGetDesc]]&lt;br /&gt;
&lt;br /&gt;
https://jira.secondlife.com/browse/BUG-11311&lt;br /&gt;
&lt;br /&gt;
llSetText(llDumpList2String(llParseStringKeepNulls(llGetObjectDesc(),[&amp;quot;\\n&amp;quot;],[]),&amp;quot;\n&amp;quot;),&amp;lt;1.0,1.0,1.0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
llSetText doesn&#039;t parse llGetDesc properly and can&#039;t parse line breaks or other string escapes&lt;/div&gt;</summary>
		<author><name>Digimbyte Resident</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=Talk:LlSetText&amp;diff=1199004</id>
		<title>Talk:LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=Talk:LlSetText&amp;diff=1199004"/>
		<updated>2016-01-30T00:07:29Z</updated>

		<summary type="html">&lt;p&gt;Digimbyte Resident: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== JIRA New Feature llGetText ==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s a first draft. Good to go? Ready to add near http://jira.secondlife.com/secure/QuickSearch.jspa after logging in with the usual Second Life name &amp;amp; password? Yes/ no/ almost? -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 20:55, 1 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
PROJECT = MISC (chosen from VWR SVX WEB MISC Eventlet Mulib CertifiedHTTP)&lt;br /&gt;
&lt;br /&gt;
ISSUE TYPE = New Feature (chosen from Bug, New Feature)&lt;br /&gt;
&lt;br /&gt;
SUMMARY = A function named llGetText should exist to tell the script calling llSetText if the script is or is not changing the floating text of the prim.&lt;br /&gt;
&lt;br /&gt;
PRIORITY = Normal (chosen from Showstopper, Critical, Major, Normal, Small)&lt;br /&gt;
&lt;br /&gt;
COMPONENT/S = Unknown (chosen from Unknown, Miscellaneous)&lt;br /&gt;
&lt;br /&gt;
AFFECTS VERSION/S = Unknown (not editable)&lt;br /&gt;
&lt;br /&gt;
LINDEN LAB ISSUE ID = (intentionally left blank)&lt;br /&gt;
&lt;br /&gt;
ENVIRONMENT = N/A&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION =&lt;br /&gt;
&lt;br /&gt;
A function named llGetText should exist to tell the script calling llSetText if the script is or is not changing the floating text of the prim. For example, llGetText could return a list of four results: [text, color, alpha, font].&lt;br /&gt;
&lt;br /&gt;
This specific need to add llGetText to LSL illustrates a general design principle. LSL should define a way to get back everything it sets. Otherwise one script cannot discover if another script has set a property. For example, a script cannot see if an object has been labeled for sale, given a custom label, or given no label at all as its floating text. As another example, an instance of an editor script cannot show the operator if the operator has set the property thru another script instance.&lt;br /&gt;
&lt;br /&gt;
ATTACHMENT = None&lt;br /&gt;
&lt;br /&gt;
PATCH ATTACHED = (intentionally left blank)&lt;br /&gt;
&lt;br /&gt;
SOURCE VERSION = (intentionally left blank)&lt;br /&gt;
&lt;br /&gt;
== llGetText ==&lt;br /&gt;
&lt;br /&gt;
I think it should point to a JIRA feature suggestion but I&#039;m not feeling inspired enough to write one up. -- [[User:Strife Onizuka|Strife Onizuka]] 12:55, 29 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Thanks for making time to say so. I didn&#039;t know that. Now that I do, I&#039;ll volunteer me to research and then publish an article here that invites our audience to contribute to JIRA also. Writing up the JIRA entry for llGetText will be my first example, unless another among us beats me to it. -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 13:07, 29 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:[[User:Strife_Onizuka]] &amp;gt; http://wiki.secondlife.com/wiki/Category:Jira_Reporters &amp;gt; [[Bug Reporting 101]] may be relevant. -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 13:16, 29 October 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Wow that mess of a web of pages near [[Bug Reporting 101]] is nearly indecipherable.&lt;br /&gt;
&lt;br /&gt;
:http://jira.secondlife.com/secure/QuickSearch.jspa might be the first step that those too many words recommend. As of this moment, llSetText finds hits, llGetText finds no hits, confirming Strife&#039;s idea that we should add llGetText. -- [[User:Ppaatt Lynagh|Ppaatt Lynagh]] 20:26, 1 November 2007 (PDT)&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
I regret that there were so many edits, it&#039;s the first time I&#039;ve contributed content to this Wiki, and am still learning the formatting.  Thanks for understanding.  It would help if there were a generic page with the formatting already in place that users could edit -- there may be one somewhere, but I haven&#039;t found it yet.  -- [[User:Rich Nykvist|Rich]]&lt;br /&gt;
:Don&#039;t worry about the number of edits. Just look around at the syntax used on other pages, it&#039;s the easiest way. [[User:Strife Onizuka|Strife Onizuka]] 04:54, 8 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
: With the exception of editing actual template code (as opposed to code that uses templates), the &amp;quot;Show Preview&amp;quot; button will allow you to keep an eye on your changes without committing them to the article :-)&lt;br /&gt;
: [[User:SignpostMarv Martin|SignpostMarv Martin]] 05:36, 8 February 2007 (PST)&lt;br /&gt;
&lt;br /&gt;
== Different colors in the displayed text? ==&lt;br /&gt;
&lt;br /&gt;
I recently saw some RPG engine that lets people have colored health bars in the hovertext above their head.&lt;br /&gt;
&lt;br /&gt;
Is there a way to specify colors for individual text characters, or are they doing this by stacking up several llSetText prims, each showing only one color? [[User:Scalar Tardis|Scalar Tardis]] 20:25, 25 March 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
:Stacking. -- [[User:Strife Onizuka|Strife Onizuka]] 15:19, 26 March 2008 (PDT)&lt;br /&gt;
&lt;br /&gt;
== llSetText for storage ==&lt;br /&gt;
&lt;br /&gt;
Regarding the caveat &amp;quot;Do not rely on Floating Text as a storage medium; it is neither secure nor finalized.&amp;quot; I&#039;m wondering how necessary some of this is as a caveat anymore?&lt;br /&gt;
&lt;br /&gt;
I&#039;m not aware of the text limit for hover-text having changed in a long time, and even if it were to change that&#039;s an argument for checking that any stored data is the length you expect it to be (e.g- store expected length first). The main argument against storage is the lack of security, but the same is true of using prim descriptions, which are also commonly used for storage that can survive resets.&lt;br /&gt;
&lt;br /&gt;
I often use invisible set-text to store short pieces of persistent data that I need to survive resets (but which I&#039;m not concerned about being inspected), while leaving descriptions free for users to change manually (as I like to use descriptions for specifying prim-properties that a script can load, such as allowing a script to change all prims with the &amp;quot;primary&amp;quot; keyword). Obviously pushing the limits of either isn&#039;t a great idea, but short text should be fine in both so long as it&#039;s nothing sensitive, so I&#039;m wondering if the caveats should be updated to reflect that? The caveats for this page could probably use a cleanup in general actually, as things like clearing text could do with being in examples I think. --&#039;&#039;&#039;[[User:Haravikk_Mistral|Haravikk]]&#039;&#039;&#039; 01:58, 12 January 2016 (PST)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== New Information ==&lt;br /&gt;
Need to add a caveat about [[llGetDesc]]&lt;br /&gt;
https://jira.secondlife.com/browse/BUG-11311&lt;br /&gt;
llSetText(llDumpList2String(llParseStringKeepNulls(llGetObjectDesc(),[&amp;quot;\\n&amp;quot;],[]),&amp;quot;\n&amp;quot;),&amp;lt;1.0,1.0,1.0&amp;gt;,1.0);&lt;br /&gt;
&lt;br /&gt;
llSetText doesn&#039;t parse llGetDesc properly&lt;/div&gt;</summary>
		<author><name>Digimbyte Resident</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199003</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199003"/>
		<updated>2016-01-29T23:59:51Z</updated>

		<summary type="html">&lt;p&gt;Digimbyte Resident: Undo revision 1199000 by Digimbyte Resident (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{:PRIM_TEXT|set}}{{Issues/SVC-4539}}{{Issues/BUG-11077}}&lt;br /&gt;
|func_id=152&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=string|p1_name=text&lt;br /&gt;
|p2_type=vector|p2_name=color&lt;br /&gt;
|p3_type=float|p3_name=alpha&lt;br /&gt;
|func_desc=Displays {{LSLP|text}} that hovers over the prim with specific {{LSLP|color}} and translucency (specified with {{LSLP|alpha}}).&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=&lt;br /&gt;
|caveats=&lt;br /&gt;
*If more than one [[llSetText]] is called (By reset,interaction or script state) within a prim the latest call will take priority over the previous.&lt;br /&gt;
*{{LSLP|text}} is limited to 254 [[bytes]] (compare [[Limits#Building]]), if the [[string]] is longer it will be truncated to 254 [[bytes]], even if that means the truncation will chop a character in half.&lt;br /&gt;
*An unbroken line of text of a great length may be broken automatically into two lines (one above the other).&lt;br /&gt;
*{{LSLP|text}} can be seen through walls and other object. Be considerate of neighbors in malls and apartment buildings.&lt;br /&gt;
**Visibility distance increases with prim size.&lt;br /&gt;
*Removing the script or deactivating it &#039;&#039;&#039;will not remove&#039;&#039;&#039; a prim&#039;s {{LSLP|text}} property. Floating {{LSLP|text}} is not dependent on a script for its continued existence but only when wanting to change it.&lt;br /&gt;
*To remove a prim&#039;s {{LSLP|text}}, use the following:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Preferred method to remove a prim&#039;s floating {{LSLP|text}}&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Second method does the same effect-wise.&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*Vertical whitespace is removed from the end of the {{LSLP|text}} string, so if you want vertical whitespace put any character (like a space) on the last line.&lt;br /&gt;
*Multiple linebreaks with empty lines are converted to a single linebreak, so add a whitespace character on every line you want to skip:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Good&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Bad&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n \n \n \n \n &amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n\n\n\n\n&amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*&#039;&#039;&#039;Measurements showed a high impact of process time when doing numerous iterations in a while loop&#039;&#039;&#039;. For approx. 65 thousand iterations the process times are ca. 5 seconds without floating text, 24 seconds with [[llSetText]] and 96 seconds when using [[llSetPrimitiveParams#llSetLinkPrimitiveParamsFast]] in combination with [[PRIM_TEXT]]. Thats why you are &#039;&#039;&#039;not advised&#039;&#039;&#039; to make excessive use of changing a prim&#039;s {{LSLP|text}} within such iterations.&lt;br /&gt;
|examples=&lt;br /&gt;
Example of how [[llSetText]] could be used to show prim&#039;s name in green {{LSLP|text}}:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        vector COLOR_GREEN = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
        float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
//      prim&#039;s name (not necessarily object&#039;s)&lt;br /&gt;
        llSetText(llGetObjectName(), COLOR_GREEN, OPAQUE );&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default the floating {{LSLP|text}} will appear on a single line. However, it can be spread over multiple lines by using a line break &amp;lt;code&amp;gt;&amp;quot;\n&amp;quot;&amp;lt;/code&amp;gt; (read [[SplitLine]] in section &#039;See Also&#039;).&lt;br /&gt;
&lt;br /&gt;
===String escape codes:===&lt;br /&gt;
&lt;br /&gt;
LSL has four [[String#Escape Codes|string escape codes]]:&lt;br /&gt;
* &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; for a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; for a backslash&lt;br /&gt;
* &amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; for a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;\&amp;quot;&amp;lt;/code&amp;gt; for a double-quote&lt;br /&gt;
&lt;br /&gt;
===Color &amp;amp; Alpha===&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! Color&lt;br /&gt;
! Code&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #001f3f&amp;quot; {{!}}NAVY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.122, 0.247&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #0074d9&amp;quot; {{!}}BLUE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.455, 0.851&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #7fdbff&amp;quot; {{!}}AQUA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.498, 0.859, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #39cccc&amp;quot; {{!}}TEAL&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.224, 0.800, 0.800&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #3d9970&amp;quot; {{!}}OLIVE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.239, 0.600, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #2ecc40&amp;quot; {{!}}GREEN&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.180, 0.800, 0.251&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #01ff70&amp;quot; {{!}}LIME&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.004, 1.000, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffdc00&amp;quot; {{!}}YELLOW&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.863, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff851b&amp;quot; {{!}}ORANGE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.522, 0.106&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff4136&amp;quot; {{!}}RED&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.255, 0.212&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #85144b&amp;quot; {{!}}MAROON&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.522, 0.078, 0.294&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #f012be&amp;quot; {{!}}FUCHSIA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.941, 0.071, 0.745&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #b10dc9&amp;quot; {{!}}PURPLE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.694, 0.051, 0.788&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffffff&amp;quot; {{!}}WHITE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 1.000, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #dddddd&amp;quot; {{!}}SILVER&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.867, 0.867, 0.867&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #aaaaaa&amp;quot; {{!}}GRAY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.667, 0.667, 0.667&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #111111&amp;quot; {{!}}BLACK&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.000, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
The x, y &amp;amp; z [[Vector#Components|components of the vector]] are used to represent red, green, and blue respectively. The range is &amp;lt;span style=&amp;quot;background-color: yellow&amp;quot;&amp;gt;different from traditional RGB&amp;lt;/span&amp;gt;, instead of being 0 -&amp;gt; 255, LSL uses 0 -&amp;gt; 1. &amp;lt;code&amp;gt;&amp;lt;1.0, 1.0, 1.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;white&amp;quot; and &amp;lt;code&amp;gt;&amp;lt;0.0, 0.0, 0.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;black&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  white &amp;amp; opaque&lt;br /&gt;
    llSetText(&amp;quot;I am white&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector myColor;// defaults to ZERO_VECTOR or &amp;lt;0.0, 0.0, 0.0&amp;gt; which is black&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am black and 30% transparent.&amp;quot;, myColor, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSleep(7.5);   // before: &amp;lt;0.0, 0.0, 0.0&amp;gt; black&lt;br /&gt;
    myColor.x = 1.0;// now:    &amp;lt;1.0, 0.0, 0.0&amp;gt; red&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am now red and 10% transparent.&amp;quot;, myColor, 0.9);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If {{LSLP|alpha}} is 1.0 it means the {{LSLP|text}} is fully opaque (alpha), 0.0 would make it completely transparent (invisible):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    llSetText(&amp;quot;green text with alpha 0.7&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 0.4\n60% transparent&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 0.4);&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 1.0\nfully opaque&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&lt;br /&gt;
//  next to lines have the same effect&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Multiple lines===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  two lines of orange text&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am\non two lines!&amp;quot;, &amp;lt;1.0, 0.4, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|helpers=&lt;br /&gt;
Drag this script out of inventory onto an object to erase its set text:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
// http://wiki.secondlife.com/wiki/llSetText&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
//      remove floating text (empty string &amp;amp; black &amp;amp; 100% transparent)&lt;br /&gt;
        llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0.0);&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Code to easily specify appearance of hovertext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
vector NAVY    = &amp;lt;0,     0.122, 0.247&amp;gt;;&lt;br /&gt;
vector BLUE    = &amp;lt;0,     0.455, 0.851&amp;gt;;&lt;br /&gt;
vector AQUA    = &amp;lt;0.498, 0.859, 1    &amp;gt;;&lt;br /&gt;
vector TEAL    = &amp;lt;0.224, 0.8,   0.8  &amp;gt;;&lt;br /&gt;
vector OLIVE   = &amp;lt;0.239, 0.6,   0.439&amp;gt;;&lt;br /&gt;
vector GREEN   = &amp;lt;0.18,  0.8,   0.251&amp;gt;;&lt;br /&gt;
vector LIME    = &amp;lt;0.004, 1    , 0.439&amp;gt;;&lt;br /&gt;
vector YELLOW  = &amp;lt;1    , 0.863, 0    &amp;gt;;&lt;br /&gt;
vector ORANGE  = &amp;lt;1    , 0.522, 0.106&amp;gt;;&lt;br /&gt;
vector RED     = &amp;lt;1    , 0.255, 0.212&amp;gt;;&lt;br /&gt;
vector MAROON  = &amp;lt;0.522, 0.078, 0.294&amp;gt;;&lt;br /&gt;
vector FUCHSIA = &amp;lt;0.941, 0.071, 0.745&amp;gt;;&lt;br /&gt;
vector PURPLE  = &amp;lt;0.694, 0.051, 0.788&amp;gt;;&lt;br /&gt;
vector WHITE   = &amp;lt;1    , 1    , 1    &amp;gt;;&lt;br /&gt;
vector SILVER  = &amp;lt;0.867, 0.867, 0.867&amp;gt;;&lt;br /&gt;
vector GRAY    = &amp;lt;0.667, 0.667, 0.667&amp;gt;;&lt;br /&gt;
vector BLACK   = &amp;lt;0.000, 0.000, 0.000&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
string  hoverText   = &amp;quot;TEXT GOES HERE&amp;quot;;&lt;br /&gt;
vector  hoverColor  = LIME;//  set predefined color or any RGB color vector in float form&lt;br /&gt;
float   hoverAlpha  = 1.0; // Sets the text&#039;s transparency, 1.0 being opaque, while 0.0 would be transparent&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetText(hoverText, hoverColor, hoverAlpha);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To make hovertext when using linked prims you can use this simple function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
mySetLinkText(integer linknum, string text, vector color, float alpha) {&lt;br /&gt;
    llSetLinkPrimitiveParamsFast(linknum, [PRIM_TEXT, text, color, alpha]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// For example:&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        mySetLinkText(LINK_SET, &amp;quot;TEST&amp;quot;, &amp;lt;0, 1, 0&amp;gt;, 0.5);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|also&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_constants=&lt;br /&gt;
{{LSL DefineRow||[[PRIM_TEXT]]}}&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||[[:Category:LSL Examples|Examples]]: [[SplitLine]]|Insert &#039;new line&#039; escape codes at certain positions of a string}}&lt;br /&gt;
{{LSL DefineRow||Useful snippet: [[llGetObjectPermMask]]|Label an object with text and newlines to give away or sell}}&lt;br /&gt;
|notes=To actually display text on a prim, see [[XyzzyText]], or consider using parcel prim [[:Category:LSL_Media|Media]] options (useful only if you have control over the land&#039;s media settings.)&lt;br /&gt;
----&lt;br /&gt;
The function displays {{LSLP|text}} that hover over the prim&#039;s center, the prim position. The height over the center is proportional to the prim&#039;s Z-dimension exclusively&lt;br /&gt;
* It doesn&#039;t matter how the prim is rotated, so if Z is smaller than X and Y the {{LSLP|text}} may be seen {{LSLP|on}} the prim&lt;br /&gt;
|cat1=Effects&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3=Stop&lt;br /&gt;
|cat4=Floating Text&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Digimbyte Resident</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199002</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199002"/>
		<updated>2016-01-29T23:58:36Z</updated>

		<summary type="html">&lt;p&gt;Digimbyte Resident: Undo revision 1199001 by Digimbyte Resident (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{:PRIM_TEXT|set}}{{Issues/SVC-4539}}{{Issues/BUG-11077}}&lt;br /&gt;
|func_id=152&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=string|p1_name=text&lt;br /&gt;
|p2_type=vector|p2_name=color&lt;br /&gt;
|p3_type=float|p3_name=alpha&lt;br /&gt;
|func_desc=Displays {{LSLP|text}} that hovers over the prim with specific {{LSLP|color}} and translucency (specified with {{LSLP|alpha}}).&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=&lt;br /&gt;
|caveats=&lt;br /&gt;
*If more than one [[llSetText]] is called (By reset,interaction or script state) within a prim the latest call will take priority over the previous.&lt;br /&gt;
*{{LSLP|text}} is limited to 254 [[bytes]] (compare [[Limits#Building]]), if the [[string]] is longer it will be truncated to 254 [[bytes]], even if that means the truncation will chop a character in half.&lt;br /&gt;
*An unbroken line of text of a great length may be broken automatically into two lines (one above the other).&lt;br /&gt;
*{{LSLP|text}} can be seen through walls and other object. Be considerate of neighbors in malls and apartment buildings.&lt;br /&gt;
**Visibility distance increases with prim size.&lt;br /&gt;
*Removing the script or deactivating it &#039;&#039;&#039;will not remove&#039;&#039;&#039; a prim&#039;s {{LSLP|text}} property. Floating {{LSLP|text}} is not dependent on a script for its continued existence but only when wanting to change it.&lt;br /&gt;
*If setting text Via [[llGetDesc]] you need to parse it like so:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Preferred method to remove a prim&#039;s floating {{LSLP|text}}&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  Get Description and use it as a String (Get Description does not return a true string)&lt;br /&gt;
    llSetText(llDumpList2String(llParseStringKeepNulls(llGetObjectDesc(),[&amp;quot;\\n&amp;quot;],[]),&amp;quot;\n&amp;quot;),&amp;lt;1.0,1.0,1.0&amp;gt;,1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
*To remove a prim&#039;s {{LSLP|text}}, use the following:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Preferred method to remove a prim&#039;s floating {{LSLP|text}}&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Second method does the same effect-wise.&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*Vertical whitespace is removed from the end of the {{LSLP|text}} string, so if you want vertical whitespace put any character (like a space) on the last line.&lt;br /&gt;
*Multiple linebreaks with empty lines are converted to a single linebreak, so add a whitespace character on every line you want to skip:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Good&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Bad&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n \n \n \n \n &amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n\n\n\n\n&amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*&#039;&#039;&#039;Measurements showed a high impact of process time when doing numerous iterations in a while loop&#039;&#039;&#039;. For approx. 65 thousand iterations the process times are ca. 5 seconds without floating text, 24 seconds with [[llSetText]] and 96 seconds when using [[llSetPrimitiveParams#llSetLinkPrimitiveParamsFast]] in combination with [[PRIM_TEXT]]. Thats why you are &#039;&#039;&#039;not advised&#039;&#039;&#039; to make excessive use of changing a prim&#039;s {{LSLP|text}} within such iterations.&lt;br /&gt;
|examples=&lt;br /&gt;
Example of how [[llSetText]] could be used to show prim&#039;s name in green {{LSLP|text}}:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        vector COLOR_GREEN = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
        float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
//      prim&#039;s name (not necessarily object&#039;s)&lt;br /&gt;
        llSetText(llGetObjectName(), COLOR_GREEN, OPAQUE );&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default the floating {{LSLP|text}} will appear on a single line. However, it can be spread over multiple lines by using a line break &amp;lt;code&amp;gt;&amp;quot;\n&amp;quot;&amp;lt;/code&amp;gt; (read [[SplitLine]] in section &#039;See Also&#039;).&lt;br /&gt;
&lt;br /&gt;
===String escape codes:===&lt;br /&gt;
&lt;br /&gt;
LSL has four [[String#Escape Codes|string escape codes]]:&lt;br /&gt;
* &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; for a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; for a backslash&lt;br /&gt;
* &amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; for a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;\&amp;quot;&amp;lt;/code&amp;gt; for a double-quote&lt;br /&gt;
&lt;br /&gt;
===Color &amp;amp; Alpha===&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! Color&lt;br /&gt;
! Code&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #001f3f&amp;quot; {{!}}NAVY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.122, 0.247&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #0074d9&amp;quot; {{!}}BLUE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.455, 0.851&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #7fdbff&amp;quot; {{!}}AQUA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.498, 0.859, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #39cccc&amp;quot; {{!}}TEAL&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.224, 0.800, 0.800&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #3d9970&amp;quot; {{!}}OLIVE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.239, 0.600, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #2ecc40&amp;quot; {{!}}GREEN&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.180, 0.800, 0.251&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #01ff70&amp;quot; {{!}}LIME&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.004, 1.000, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffdc00&amp;quot; {{!}}YELLOW&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.863, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff851b&amp;quot; {{!}}ORANGE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.522, 0.106&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff4136&amp;quot; {{!}}RED&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.255, 0.212&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #85144b&amp;quot; {{!}}MAROON&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.522, 0.078, 0.294&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #f012be&amp;quot; {{!}}FUCHSIA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.941, 0.071, 0.745&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #b10dc9&amp;quot; {{!}}PURPLE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.694, 0.051, 0.788&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffffff&amp;quot; {{!}}WHITE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 1.000, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #dddddd&amp;quot; {{!}}SILVER&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.867, 0.867, 0.867&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #aaaaaa&amp;quot; {{!}}GRAY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.667, 0.667, 0.667&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #111111&amp;quot; {{!}}BLACK&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.000, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
The x, y &amp;amp; z [[Vector#Components|components of the vector]] are used to represent red, green, and blue respectively. The range is &amp;lt;span style=&amp;quot;background-color: yellow&amp;quot;&amp;gt;different from traditional RGB&amp;lt;/span&amp;gt;, instead of being 0 -&amp;gt; 255, LSL uses 0 -&amp;gt; 1. &amp;lt;code&amp;gt;&amp;lt;1.0, 1.0, 1.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;white&amp;quot; and &amp;lt;code&amp;gt;&amp;lt;0.0, 0.0, 0.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;black&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  white &amp;amp; opaque&lt;br /&gt;
    llSetText(&amp;quot;I am white&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector myColor;// defaults to ZERO_VECTOR or &amp;lt;0.0, 0.0, 0.0&amp;gt; which is black&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am black and 30% transparent.&amp;quot;, myColor, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSleep(7.5);   // before: &amp;lt;0.0, 0.0, 0.0&amp;gt; black&lt;br /&gt;
    myColor.x = 1.0;// now:    &amp;lt;1.0, 0.0, 0.0&amp;gt; red&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am now red and 10% transparent.&amp;quot;, myColor, 0.9);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If {{LSLP|alpha}} is 1.0 it means the {{LSLP|text}} is fully opaque (alpha), 0.0 would make it completely transparent (invisible):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    llSetText(&amp;quot;green text with alpha 0.7&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 0.4\n60% transparent&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 0.4);&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 1.0\nfully opaque&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&lt;br /&gt;
//  next to lines have the same effect&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Multiple lines===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  two lines of orange text&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am\non two lines!&amp;quot;, &amp;lt;1.0, 0.4, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|helpers=&lt;br /&gt;
Drag this script out of inventory onto an object to erase its set text:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
// http://wiki.secondlife.com/wiki/llSetText&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
//      remove floating text (empty string &amp;amp; black &amp;amp; 100% transparent)&lt;br /&gt;
        llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0.0);&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Code to easily specify appearance of hovertext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
vector NAVY    = &amp;lt;0,     0.122, 0.247&amp;gt;;&lt;br /&gt;
vector BLUE    = &amp;lt;0,     0.455, 0.851&amp;gt;;&lt;br /&gt;
vector AQUA    = &amp;lt;0.498, 0.859, 1    &amp;gt;;&lt;br /&gt;
vector TEAL    = &amp;lt;0.224, 0.8,   0.8  &amp;gt;;&lt;br /&gt;
vector OLIVE   = &amp;lt;0.239, 0.6,   0.439&amp;gt;;&lt;br /&gt;
vector GREEN   = &amp;lt;0.18,  0.8,   0.251&amp;gt;;&lt;br /&gt;
vector LIME    = &amp;lt;0.004, 1    , 0.439&amp;gt;;&lt;br /&gt;
vector YELLOW  = &amp;lt;1    , 0.863, 0    &amp;gt;;&lt;br /&gt;
vector ORANGE  = &amp;lt;1    , 0.522, 0.106&amp;gt;;&lt;br /&gt;
vector RED     = &amp;lt;1    , 0.255, 0.212&amp;gt;;&lt;br /&gt;
vector MAROON  = &amp;lt;0.522, 0.078, 0.294&amp;gt;;&lt;br /&gt;
vector FUCHSIA = &amp;lt;0.941, 0.071, 0.745&amp;gt;;&lt;br /&gt;
vector PURPLE  = &amp;lt;0.694, 0.051, 0.788&amp;gt;;&lt;br /&gt;
vector WHITE   = &amp;lt;1    , 1    , 1    &amp;gt;;&lt;br /&gt;
vector SILVER  = &amp;lt;0.867, 0.867, 0.867&amp;gt;;&lt;br /&gt;
vector GRAY    = &amp;lt;0.667, 0.667, 0.667&amp;gt;;&lt;br /&gt;
vector BLACK   = &amp;lt;0.000, 0.000, 0.000&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
string  hoverText   = &amp;quot;TEXT GOES HERE&amp;quot;;&lt;br /&gt;
vector  hoverColor  = LIME;//  set predefined color or any RGB color vector in float form&lt;br /&gt;
float   hoverAlpha  = 1.0; // Sets the text&#039;s transparency, 1.0 being opaque, while 0.0 would be transparent&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetText(hoverText, hoverColor, hoverAlpha);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To make hovertext when using linked prims you can use this simple function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
mySetLinkText(integer linknum, string text, vector color, float alpha) {&lt;br /&gt;
    llSetLinkPrimitiveParamsFast(linknum, [PRIM_TEXT, text, color, alpha]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// For example:&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        mySetLinkText(LINK_SET, &amp;quot;TEST&amp;quot;, &amp;lt;0, 1, 0&amp;gt;, 0.5);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|also&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_constants=&lt;br /&gt;
{{LSL DefineRow||[[PRIM_TEXT]]}}&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||[[:Category:LSL Examples|Examples]]: [[SplitLine]]|Insert &#039;new line&#039; escape codes at certain positions of a string}}&lt;br /&gt;
{{LSL DefineRow||Useful snippet: [[llGetObjectPermMask]]|Label an object with text and newlines to give away or sell}}&lt;br /&gt;
|notes=To actually display text on a prim, see [[XyzzyText]], or consider using parcel prim [[:Category:LSL_Media|Media]] options (useful only if you have control over the land&#039;s media settings.)&lt;br /&gt;
----&lt;br /&gt;
The function displays {{LSLP|text}} that hover over the prim&#039;s center, the prim position. The height over the center is proportional to the prim&#039;s Z-dimension exclusively&lt;br /&gt;
* It doesn&#039;t matter how the prim is rotated, so if Z is smaller than X and Y the {{LSLP|text}} may be seen {{LSLP|on}} the prim&lt;br /&gt;
|cat1=Effects&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3=Stop&lt;br /&gt;
|cat4=Floating Text&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Digimbyte Resident</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199001</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199001"/>
		<updated>2016-01-29T23:57:41Z</updated>

		<summary type="html">&lt;p&gt;Digimbyte Resident: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{:PRIM_TEXT|set}}{{Issues/SVC-4539}}{{Issues/BUG-11077}}&lt;br /&gt;
|func_id=152&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=string|p1_name=text&lt;br /&gt;
|p2_type=vector|p2_name=color&lt;br /&gt;
|p3_type=float|p3_name=alpha&lt;br /&gt;
|func_desc=Displays {{LSLP|text}} that hovers over the prim with specific {{LSLP|color}} and translucency (specified with {{LSLP|alpha}}).&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=&lt;br /&gt;
|caveats=&lt;br /&gt;
*If more than one [[llSetText]] is called (By reset,interaction or script state) within a prim the latest call will take priority over the previous.&lt;br /&gt;
*{{LSLP|text}} is limited to 254 [[bytes]] (compare [[Limits#Building]]), if the [[string]] is longer it will be truncated to 254 [[bytes]], even if that means the truncation will chop a character in half.&lt;br /&gt;
*An unbroken line of text of a great length may be broken automatically into two lines (one above the other).&lt;br /&gt;
*{{LSLP|text}} can be seen through walls and other object. Be considerate of neighbors in malls and apartment buildings.&lt;br /&gt;
**Visibility distance increases with prim size.&lt;br /&gt;
*Removing the script or deactivating it &#039;&#039;&#039;will not remove&#039;&#039;&#039; a prim&#039;s {{LSLP|text}} property. Floating {{LSLP|text}} is not dependent on a script for its continued existence but only when wanting to change it.&lt;br /&gt;
&lt;br /&gt;
*To remove a prim&#039;s {{LSLP|text}}, use the following:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Preferred method to remove a prim&#039;s floating {{LSLP|text}}&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Second method does the same effect-wise.&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*Vertical whitespace is removed from the end of the {{LSLP|text}} string, so if you want vertical whitespace put any character (like a space) on the last line.&lt;br /&gt;
*Multiple linebreaks with empty lines are converted to a single linebreak, so add a whitespace character on every line you want to skip:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Good&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Bad&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n \n \n \n \n &amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n\n\n\n\n&amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*&#039;&#039;&#039;Measurements showed a high impact of process time when doing numerous iterations in a while loop&#039;&#039;&#039;. For approx. 65 thousand iterations the process times are ca. 5 seconds without floating text, 24 seconds with [[llSetText]] and 96 seconds when using [[llSetPrimitiveParams#llSetLinkPrimitiveParamsFast]] in combination with [[PRIM_TEXT]]. Thats why you are &#039;&#039;&#039;not advised&#039;&#039;&#039; to make excessive use of changing a prim&#039;s {{LSLP|text}} within such iterations.&lt;br /&gt;
|examples=&lt;br /&gt;
Example of how [[llSetText]] could be used to show prim&#039;s name in green {{LSLP|text}}:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        vector COLOR_GREEN = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
        float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
//      prim&#039;s name (not necessarily object&#039;s)&lt;br /&gt;
        llSetText(llGetObjectName(), COLOR_GREEN, OPAQUE );&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default the floating {{LSLP|text}} will appear on a single line. However, it can be spread over multiple lines by using a line break &amp;lt;code&amp;gt;&amp;quot;\n&amp;quot;&amp;lt;/code&amp;gt; (read [[SplitLine]] in section &#039;See Also&#039;).&lt;br /&gt;
&lt;br /&gt;
===String escape codes:===&lt;br /&gt;
&lt;br /&gt;
LSL has four [[String#Escape Codes|string escape codes]]:&lt;br /&gt;
* &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; for a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; for a backslash&lt;br /&gt;
* &amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; for a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;\&amp;quot;&amp;lt;/code&amp;gt; for a double-quote&lt;br /&gt;
&lt;br /&gt;
===Color &amp;amp; Alpha===&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! Color&lt;br /&gt;
! Code&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #001f3f&amp;quot; {{!}}NAVY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.122, 0.247&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #0074d9&amp;quot; {{!}}BLUE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.455, 0.851&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #7fdbff&amp;quot; {{!}}AQUA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.498, 0.859, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #39cccc&amp;quot; {{!}}TEAL&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.224, 0.800, 0.800&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #3d9970&amp;quot; {{!}}OLIVE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.239, 0.600, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #2ecc40&amp;quot; {{!}}GREEN&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.180, 0.800, 0.251&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #01ff70&amp;quot; {{!}}LIME&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.004, 1.000, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffdc00&amp;quot; {{!}}YELLOW&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.863, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff851b&amp;quot; {{!}}ORANGE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.522, 0.106&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff4136&amp;quot; {{!}}RED&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.255, 0.212&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #85144b&amp;quot; {{!}}MAROON&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.522, 0.078, 0.294&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #f012be&amp;quot; {{!}}FUCHSIA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.941, 0.071, 0.745&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #b10dc9&amp;quot; {{!}}PURPLE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.694, 0.051, 0.788&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffffff&amp;quot; {{!}}WHITE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 1.000, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #dddddd&amp;quot; {{!}}SILVER&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.867, 0.867, 0.867&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #aaaaaa&amp;quot; {{!}}GRAY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.667, 0.667, 0.667&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #111111&amp;quot; {{!}}BLACK&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.000, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
The x, y &amp;amp; z [[Vector#Components|components of the vector]] are used to represent red, green, and blue respectively. The range is &amp;lt;span style=&amp;quot;background-color: yellow&amp;quot;&amp;gt;different from traditional RGB&amp;lt;/span&amp;gt;, instead of being 0 -&amp;gt; 255, LSL uses 0 -&amp;gt; 1. &amp;lt;code&amp;gt;&amp;lt;1.0, 1.0, 1.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;white&amp;quot; and &amp;lt;code&amp;gt;&amp;lt;0.0, 0.0, 0.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;black&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  white &amp;amp; opaque&lt;br /&gt;
    llSetText(&amp;quot;I am white&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector myColor;// defaults to ZERO_VECTOR or &amp;lt;0.0, 0.0, 0.0&amp;gt; which is black&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am black and 30% transparent.&amp;quot;, myColor, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSleep(7.5);   // before: &amp;lt;0.0, 0.0, 0.0&amp;gt; black&lt;br /&gt;
    myColor.x = 1.0;// now:    &amp;lt;1.0, 0.0, 0.0&amp;gt; red&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am now red and 10% transparent.&amp;quot;, myColor, 0.9);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If {{LSLP|alpha}} is 1.0 it means the {{LSLP|text}} is fully opaque (alpha), 0.0 would make it completely transparent (invisible):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    llSetText(&amp;quot;green text with alpha 0.7&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 0.4\n60% transparent&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 0.4);&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 1.0\nfully opaque&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&lt;br /&gt;
//  next to lines have the same effect&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Multiple lines===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  two lines of orange text&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am\non two lines!&amp;quot;, &amp;lt;1.0, 0.4, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|helpers=&lt;br /&gt;
Drag this script out of inventory onto an object to erase its set text:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
// http://wiki.secondlife.com/wiki/llSetText&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
//      remove floating text (empty string &amp;amp; black &amp;amp; 100% transparent)&lt;br /&gt;
        llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0.0);&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Code to easily specify appearance of hovertext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
vector NAVY    = &amp;lt;0,     0.122, 0.247&amp;gt;;&lt;br /&gt;
vector BLUE    = &amp;lt;0,     0.455, 0.851&amp;gt;;&lt;br /&gt;
vector AQUA    = &amp;lt;0.498, 0.859, 1    &amp;gt;;&lt;br /&gt;
vector TEAL    = &amp;lt;0.224, 0.8,   0.8  &amp;gt;;&lt;br /&gt;
vector OLIVE   = &amp;lt;0.239, 0.6,   0.439&amp;gt;;&lt;br /&gt;
vector GREEN   = &amp;lt;0.18,  0.8,   0.251&amp;gt;;&lt;br /&gt;
vector LIME    = &amp;lt;0.004, 1    , 0.439&amp;gt;;&lt;br /&gt;
vector YELLOW  = &amp;lt;1    , 0.863, 0    &amp;gt;;&lt;br /&gt;
vector ORANGE  = &amp;lt;1    , 0.522, 0.106&amp;gt;;&lt;br /&gt;
vector RED     = &amp;lt;1    , 0.255, 0.212&amp;gt;;&lt;br /&gt;
vector MAROON  = &amp;lt;0.522, 0.078, 0.294&amp;gt;;&lt;br /&gt;
vector FUCHSIA = &amp;lt;0.941, 0.071, 0.745&amp;gt;;&lt;br /&gt;
vector PURPLE  = &amp;lt;0.694, 0.051, 0.788&amp;gt;;&lt;br /&gt;
vector WHITE   = &amp;lt;1    , 1    , 1    &amp;gt;;&lt;br /&gt;
vector SILVER  = &amp;lt;0.867, 0.867, 0.867&amp;gt;;&lt;br /&gt;
vector GRAY    = &amp;lt;0.667, 0.667, 0.667&amp;gt;;&lt;br /&gt;
vector BLACK   = &amp;lt;0.000, 0.000, 0.000&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
string  hoverText   = &amp;quot;TEXT GOES HERE&amp;quot;;&lt;br /&gt;
vector  hoverColor  = LIME;//  set predefined color or any RGB color vector in float form&lt;br /&gt;
float   hoverAlpha  = 1.0; // Sets the text&#039;s transparency, 1.0 being opaque, while 0.0 would be transparent&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetText(hoverText, hoverColor, hoverAlpha);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To make hovertext when using linked prims you can use this simple function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
mySetLinkText(integer linknum, string text, vector color, float alpha) {&lt;br /&gt;
    llSetLinkPrimitiveParamsFast(linknum, [PRIM_TEXT, text, color, alpha]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// For example:&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        mySetLinkText(LINK_SET, &amp;quot;TEST&amp;quot;, &amp;lt;0, 1, 0&amp;gt;, 0.5);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|also&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_constants=&lt;br /&gt;
{{LSL DefineRow||[[PRIM_TEXT]]}}&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||[[:Category:LSL Examples|Examples]]: [[SplitLine]]|Insert &#039;new line&#039; escape codes at certain positions of a string}}&lt;br /&gt;
{{LSL DefineRow||Useful snippet: [[llGetObjectPermMask]]|Label an object with text and newlines to give away or sell}}&lt;br /&gt;
|notes=To actually display text on a prim, see [[XyzzyText]], or consider using parcel prim [[:Category:LSL_Media|Media]] options (useful only if you have control over the land&#039;s media settings.)&lt;br /&gt;
----&lt;br /&gt;
The function displays {{LSLP|text}} that hover over the prim&#039;s center, the prim position. The height over the center is proportional to the prim&#039;s Z-dimension exclusively&lt;br /&gt;
* It doesn&#039;t matter how the prim is rotated, so if Z is smaller than X and Y the {{LSLP|text}} may be seen {{LSLP|on}} the prim&lt;br /&gt;
|cat1=Effects&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3=Stop&lt;br /&gt;
|cat4=Floating Text&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Digimbyte Resident</name></author>
	</entry>
	<entry>
		<id>https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199000</id>
		<title>LlSetText</title>
		<link rel="alternate" type="text/html" href="https://wiki.secondlife.com/w/index.php?title=LlSetText&amp;diff=1199000"/>
		<updated>2016-01-29T23:55:42Z</updated>

		<summary type="html">&lt;p&gt;Digimbyte Resident: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{LSL_Function&lt;br /&gt;
|inject-2={{:PRIM_TEXT|set}}{{Issues/SVC-4539}}{{Issues/BUG-11077}}&lt;br /&gt;
|func_id=152&lt;br /&gt;
|func_sleep=0.0&lt;br /&gt;
|func_energy=10.0&lt;br /&gt;
|func=llSetText&lt;br /&gt;
|sort=SetText&lt;br /&gt;
|p1_type=string|p1_name=text&lt;br /&gt;
|p2_type=vector|p2_name=color&lt;br /&gt;
|p3_type=float|p3_name=alpha&lt;br /&gt;
|func_desc=Displays {{LSLP|text}} that hovers over the prim with specific {{LSLP|color}} and translucency (specified with {{LSLP|alpha}}).&lt;br /&gt;
|return_text&lt;br /&gt;
|spec=&lt;br /&gt;
|caveats=&lt;br /&gt;
*If more than one [[llSetText]] is called (By reset,interaction or script state) within a prim the latest call will take priority over the previous.&lt;br /&gt;
*{{LSLP|text}} is limited to 254 [[bytes]] (compare [[Limits#Building]]), if the [[string]] is longer it will be truncated to 254 [[bytes]], even if that means the truncation will chop a character in half.&lt;br /&gt;
*An unbroken line of text of a great length may be broken automatically into two lines (one above the other).&lt;br /&gt;
*{{LSLP|text}} can be seen through walls and other object. Be considerate of neighbors in malls and apartment buildings.&lt;br /&gt;
**Visibility distance increases with prim size.&lt;br /&gt;
*Removing the script or deactivating it &#039;&#039;&#039;will not remove&#039;&#039;&#039; a prim&#039;s {{LSLP|text}} property. Floating {{LSLP|text}} is not dependent on a script for its continued existence but only when wanting to change it.&lt;br /&gt;
*If setting text Via [[llGetDesc]] you need to parse it like so:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Preferred method to remove a prim&#039;s floating {{LSLP|text}}&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  Get Description and use it as a String (Get Description does not return a true string)&lt;br /&gt;
    llSetText(llDumpList2String(llParseStringKeepNulls(llGetObjectDesc(),[&amp;quot;\\n&amp;quot;],[]),&amp;quot;\n&amp;quot;),&amp;lt;1.0,1.0,1.0&amp;gt;,1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
*To remove a prim&#039;s {{LSLP|text}}, use the following:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Preferred method to remove a prim&#039;s floating {{LSLP|text}}&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Second method does the same effect-wise.&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  empty string &amp;amp; black &amp;amp; transparent&lt;br /&gt;
    llSetText(&amp;quot;&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*Vertical whitespace is removed from the end of the {{LSLP|text}} string, so if you want vertical whitespace put any character (like a space) on the last line.&lt;br /&gt;
*Multiple linebreaks with empty lines are converted to a single linebreak, so add a whitespace character on every line you want to skip:&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; width=&amp;quot;100%&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! &#039;&#039;&#039;Good&#039;&#039;&#039;&lt;br /&gt;
! &#039;&#039;&#039;Bad&#039;&#039;&#039;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n \n \n \n \n &amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!!}}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector COLOR_WHITE = &amp;lt;1.0, 1.0, 1.0&amp;gt;;&lt;br /&gt;
    float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;Monkeys\n\n\n\n\n&amp;quot;, COLOR_WHITE, OPAQUE);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
*&#039;&#039;&#039;Measurements showed a high impact of process time when doing numerous iterations in a while loop&#039;&#039;&#039;. For approx. 65 thousand iterations the process times are ca. 5 seconds without floating text, 24 seconds with [[llSetText]] and 96 seconds when using [[llSetPrimitiveParams#llSetLinkPrimitiveParamsFast]] in combination with [[PRIM_TEXT]]. Thats why you are &#039;&#039;&#039;not advised&#039;&#039;&#039; to make excessive use of changing a prim&#039;s {{LSLP|text}} within such iterations.&lt;br /&gt;
|examples=&lt;br /&gt;
Example of how [[llSetText]] could be used to show prim&#039;s name in green {{LSLP|text}}:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        vector COLOR_GREEN = &amp;lt;0.0, 1.0, 0.0&amp;gt;;&lt;br /&gt;
        float  OPAQUE      = 1.0;&lt;br /&gt;
&lt;br /&gt;
//      prim&#039;s name (not necessarily object&#039;s)&lt;br /&gt;
        llSetText(llGetObjectName(), COLOR_GREEN, OPAQUE );&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
By default the floating {{LSLP|text}} will appear on a single line. However, it can be spread over multiple lines by using a line break &amp;lt;code&amp;gt;&amp;quot;\n&amp;quot;&amp;lt;/code&amp;gt; (read [[SplitLine]] in section &#039;See Also&#039;).&lt;br /&gt;
&lt;br /&gt;
===String escape codes:===&lt;br /&gt;
&lt;br /&gt;
LSL has four [[String#Escape Codes|string escape codes]]:&lt;br /&gt;
* &amp;lt;code&amp;gt;\n&amp;lt;/code&amp;gt; for a new line&lt;br /&gt;
* &amp;lt;code&amp;gt;\\&amp;lt;/code&amp;gt; for a backslash&lt;br /&gt;
* &amp;lt;code&amp;gt;\t&amp;lt;/code&amp;gt; for a tab&lt;br /&gt;
* &amp;lt;code&amp;gt;\&amp;quot;&amp;lt;/code&amp;gt; for a double-quote&lt;br /&gt;
&lt;br /&gt;
===Color &amp;amp; Alpha===&lt;br /&gt;
&lt;br /&gt;
{{{!}} class=&amp;quot;sortable&amp;quot; {{Prettytable}}&lt;br /&gt;
{{!}}- {{Hl2}}&lt;br /&gt;
! Color&lt;br /&gt;
! Code&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #001f3f&amp;quot; {{!}}NAVY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.122, 0.247&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #0074d9&amp;quot; {{!}}BLUE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.455, 0.851&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #7fdbff&amp;quot; {{!}}AQUA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.498, 0.859, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #39cccc&amp;quot; {{!}}TEAL&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.224, 0.800, 0.800&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #3d9970&amp;quot; {{!}}OLIVE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.239, 0.600, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #2ecc40&amp;quot; {{!}}GREEN&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.180, 0.800, 0.251&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #01ff70&amp;quot; {{!}}LIME&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.004, 1.000, 0.439&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffdc00&amp;quot; {{!}}YELLOW&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.863, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff851b&amp;quot; {{!}}ORANGE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.522, 0.106&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ff4136&amp;quot; {{!}}RED&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 0.255, 0.212&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #85144b&amp;quot; {{!}}MAROON&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.522, 0.078, 0.294&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #f012be&amp;quot; {{!}}FUCHSIA&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.941, 0.071, 0.745&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #b10dc9&amp;quot; {{!}}PURPLE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.694, 0.051, 0.788&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #ffffff&amp;quot; {{!}}WHITE&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;1.000, 1.000, 1.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #dddddd&amp;quot; {{!}}SILVER&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.867, 0.867, 0.867&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;background: #aaaaaa&amp;quot; {{!}}GRAY&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.667, 0.667, 0.667&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}} style=&amp;quot;color: white; background: #111111&amp;quot; {{!}}BLACK&lt;br /&gt;
{{!}}&amp;lt;code&amp;gt;&amp;lt;0.000, 0.000, 0.000&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{!}}}&lt;br /&gt;
&lt;br /&gt;
The x, y &amp;amp; z [[Vector#Components|components of the vector]] are used to represent red, green, and blue respectively. The range is &amp;lt;span style=&amp;quot;background-color: yellow&amp;quot;&amp;gt;different from traditional RGB&amp;lt;/span&amp;gt;, instead of being 0 -&amp;gt; 255, LSL uses 0 -&amp;gt; 1. &amp;lt;code&amp;gt;&amp;lt;1.0, 1.0, 1.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;white&amp;quot; and &amp;lt;code&amp;gt;&amp;lt;0.0, 0.0, 0.0&amp;gt;&amp;lt;/code&amp;gt; represents &amp;quot;black&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  white &amp;amp; opaque&lt;br /&gt;
    llSetText(&amp;quot;I am white&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    vector myColor;// defaults to ZERO_VECTOR or &amp;lt;0.0, 0.0, 0.0&amp;gt; which is black&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am black and 30% transparent.&amp;quot;, myColor, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSleep(7.5);   // before: &amp;lt;0.0, 0.0, 0.0&amp;gt; black&lt;br /&gt;
    myColor.x = 1.0;// now:    &amp;lt;1.0, 0.0, 0.0&amp;gt; red&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am now red and 10% transparent.&amp;quot;, myColor, 0.9);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If {{LSLP|alpha}} is 1.0 it means the {{LSLP|text}} is fully opaque (alpha), 0.0 would make it completely transparent (invisible):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
    llSetText(&amp;quot;green text with alpha 0.7&amp;quot;, &amp;lt;0.0, 1.0, 0.0&amp;gt;, 0.7);&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 0.4\n60% transparent&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 0.4);&lt;br /&gt;
    llSetText(&amp;quot;white text with alpha 1.0\nfully opaque&amp;quot;, &amp;lt;1.0, 1.0, 1.0&amp;gt;, 1.0);&lt;br /&gt;
&lt;br /&gt;
//  next to lines have the same effect&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, ZERO_VECTOR, 0);&lt;br /&gt;
    llSetText(&amp;quot;invisible black text with alpha 0.0\nfully transparent&amp;quot;, &amp;lt;0.0, 0.0, 0.0&amp;gt;, 0.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===Multiple lines===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
//  two lines of orange text&lt;br /&gt;
&lt;br /&gt;
    llSetText(&amp;quot;I am\non two lines!&amp;quot;, &amp;lt;1.0, 0.4, 0.0&amp;gt;, 1.0);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|helpers=&lt;br /&gt;
Drag this script out of inventory onto an object to erase its set text:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
// http://wiki.secondlife.com/wiki/llSetText&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
//      remove floating text (empty string &amp;amp; black &amp;amp; 100% transparent)&lt;br /&gt;
        llSetText(&amp;quot;&amp;quot;, ZERO_VECTOR, 0.0);&lt;br /&gt;
&lt;br /&gt;
//      delete the script as we only needed it to change the floating text property&lt;br /&gt;
        llRemoveInventory(llGetScriptName());&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Code to easily specify appearance of hovertext:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
vector NAVY    = &amp;lt;0,     0.122, 0.247&amp;gt;;&lt;br /&gt;
vector BLUE    = &amp;lt;0,     0.455, 0.851&amp;gt;;&lt;br /&gt;
vector AQUA    = &amp;lt;0.498, 0.859, 1    &amp;gt;;&lt;br /&gt;
vector TEAL    = &amp;lt;0.224, 0.8,   0.8  &amp;gt;;&lt;br /&gt;
vector OLIVE   = &amp;lt;0.239, 0.6,   0.439&amp;gt;;&lt;br /&gt;
vector GREEN   = &amp;lt;0.18,  0.8,   0.251&amp;gt;;&lt;br /&gt;
vector LIME    = &amp;lt;0.004, 1    , 0.439&amp;gt;;&lt;br /&gt;
vector YELLOW  = &amp;lt;1    , 0.863, 0    &amp;gt;;&lt;br /&gt;
vector ORANGE  = &amp;lt;1    , 0.522, 0.106&amp;gt;;&lt;br /&gt;
vector RED     = &amp;lt;1    , 0.255, 0.212&amp;gt;;&lt;br /&gt;
vector MAROON  = &amp;lt;0.522, 0.078, 0.294&amp;gt;;&lt;br /&gt;
vector FUCHSIA = &amp;lt;0.941, 0.071, 0.745&amp;gt;;&lt;br /&gt;
vector PURPLE  = &amp;lt;0.694, 0.051, 0.788&amp;gt;;&lt;br /&gt;
vector WHITE   = &amp;lt;1    , 1    , 1    &amp;gt;;&lt;br /&gt;
vector SILVER  = &amp;lt;0.867, 0.867, 0.867&amp;gt;;&lt;br /&gt;
vector GRAY    = &amp;lt;0.667, 0.667, 0.667&amp;gt;;&lt;br /&gt;
vector BLACK   = &amp;lt;0.000, 0.000, 0.000&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
string  hoverText   = &amp;quot;TEXT GOES HERE&amp;quot;;&lt;br /&gt;
vector  hoverColor  = LIME;//  set predefined color or any RGB color vector in float form&lt;br /&gt;
float   hoverAlpha  = 1.0; // Sets the text&#039;s transparency, 1.0 being opaque, while 0.0 would be transparent&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llSetText(hoverText, hoverColor, hoverAlpha);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
To make hovertext when using linked prims you can use this simple function:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lsl2&amp;quot;&amp;gt;&lt;br /&gt;
mySetLinkText(integer linknum, string text, vector color, float alpha) {&lt;br /&gt;
    llSetLinkPrimitiveParamsFast(linknum, [PRIM_TEXT, text, color, alpha]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// For example:&lt;br /&gt;
&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer total_number)&lt;br /&gt;
    {&lt;br /&gt;
        mySetLinkText(LINK_SET, &amp;quot;TEST&amp;quot;, &amp;lt;0, 1, 0&amp;gt;, 0.5);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|also&lt;br /&gt;
|also_functions&lt;br /&gt;
|also_constants=&lt;br /&gt;
{{LSL DefineRow||[[PRIM_TEXT]]}}&lt;br /&gt;
|also_articles=&lt;br /&gt;
{{LSL DefineRow||[[:Category:LSL Examples|Examples]]: [[SplitLine]]|Insert &#039;new line&#039; escape codes at certain positions of a string}}&lt;br /&gt;
{{LSL DefineRow||Useful snippet: [[llGetObjectPermMask]]|Label an object with text and newlines to give away or sell}}&lt;br /&gt;
|notes=To actually display text on a prim, see [[XyzzyText]], or consider using parcel prim [[:Category:LSL_Media|Media]] options (useful only if you have control over the land&#039;s media settings.)&lt;br /&gt;
----&lt;br /&gt;
The function displays {{LSLP|text}} that hover over the prim&#039;s center, the prim position. The height over the center is proportional to the prim&#039;s Z-dimension exclusively&lt;br /&gt;
* It doesn&#039;t matter how the prim is rotated, so if Z is smaller than X and Y the {{LSLP|text}} may be seen {{LSLP|on}} the prim&lt;br /&gt;
|cat1=Effects&lt;br /&gt;
|cat2=Prim&lt;br /&gt;
|cat3=Stop&lt;br /&gt;
|cat4=Floating Text&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Digimbyte Resident</name></author>
	</entry>
</feed>