llSetText

From Second Life Wiki
Revision as of 09:58, 6 February 2007 by Rich Nykvist (talk | contribs)
Jump to navigation Jump to search

Summary

Function: llSetText( String text, Vector color, Float alpha );

This function is used to set text to display over an object in SL.

• String text
• Vector color
• Float alpha

Specification

Displays text placed over object -- programmer specifies text, color and visibility/transparency.

Caveats

Expression error: Unexpected > operator.None known.

Examples

llSetText("I am on", <1,1,1>,1.0);

<1,1,1> represents the values for red, green, and blue. <1,1,1>, means "white" and <0,0,0> means "black".

llSetText("I am off", <0,0,0>,1.0);

The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).

Notes

Most people put this in the default code, such as:

default {

    state_entry()
    {
    llSay(0, "Hello, Avatar!");
    llSetText("Prize Box", <0,1,0>, 1.0);
    }
    touch_start(integer total_number)
    {
    llSay(0, "Touched.");
    }

}

Deep Notes

Signature

function void llSetText( String text, Vector color, Float alpha );