The integer constant PRIM_TEXT has the value 26

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

Syntax

integer PRIM_TEXT = 26;

Usage

llSetPrimitiveParams([ PRIM_TEXT, string text, vector color, float alpha ]);

stringtextfloating text to display
vectorcolorcolor in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
floatalphafrom 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0)

Syntax for: llSetPrimitiveParams, llSetLinkPrimitiveParams & llSetLinkPrimitiveParamsFast

llGetPrimitiveParams([ PRIM_TEXT ]);

Returns the list [ string text, vector color, float alpha ]

stringtextfloating text displayed
vectorcolorcolor in RGB <R, G, B> (<0.0, 0.0, 0.0> = black, <1.0, 1.0, 1.0> = white)
floatalphafrom 0.0 (clear) to 1.0 (solid) (0.0 <= alpha <= 1.0)

Syntax for: llGetPrimitiveParams, llGetLinkPrimitiveParams

Caveats

Examples

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]), " "));
            }
        }
    }
}

See also

Functions

Articles

Footnotes

  1. Floating text with an alpha set to 0.0 is rendered "invisible"