Difference between revisions of "LlSetText"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{LSL_Function
{{LSL_Function
|function name = llSetText
|func_id=llSetText
|func_id=llSetText
|func_sleep=
|func_sleep=
Line 33: Line 34:
|also_functions
|also_functions
|also
|also
|notes=Most people put this in the default code, such as:
|notes=Most commonly, this is included in the default code for an object, such as:


default
default

Revision as of 12:07, 6 February 2007

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.

All Issues ~ Search JIRA for related Bugs

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 commonly, this is included in the default code for an object, 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

Search JIRA for related Issues

Signature

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