Skip to content
lsl.devlsl.devLSL Dev

PRIM_TEXT

constant
Constant
integer PRIM_TEXT = 26;

Prim parameter [PRIM_TEXT, string text, vector color, float alpha] to get or set the object's floating/hover text (equivalent to llSetText).

Constant groups

PrimParam · PrimParamGet

Other PrimParam values (42)
Other PrimParamGet values (40)

Used to get or set the object’s floating text.

  • Do not rely on Floating Text as a storage medium; it is neither secure nor finalized.
    • Floating text has been altered in past server updates, breaking existing content; future changes may occur.
    • Even “invisible”1 floating text is transmitted to the client.
      • It can be viewed by anyone with a client that is capable of rendering text that is supposed to be invisible.
      • The network packets that contain the text can be sniffed and the text read.
Example 1
12 collapsed lines
default
{
state_entry()
{
// a string to display
string displayMessage = llGetDisplayName( llGetOwner() ) + ", test number ";
// just so could test changing the displayMessage
integer loopControl;
for( loopControl = 1; loopControl < 3; ++loopControl )
{
// on first iteration set the text
if( loopControl == 1 )
{
llSetPrimitiveParams([PRIM_TEXT, displayMessage + (string)loopControl + ".", <1, 0, 0>, 1.0]);
}
// on second iteration get the text and say it.
else if( loopControl == 2 )
{
llSay(0, llDumpList2String(llGetPrimitiveParams([PRIM_TEXT]), " "));
}
}
}
}
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.

  1. Floating text with an alpha set to 0.0 is rendered “invisible” ↩