Difference between revisions of "LlSetText"

From Second Life Wiki
Jump to navigation Jump to search
Line 31: Line 31:
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).  
The 1.0 is the alpha setting. 1.0 means fully opaque, and 0.0 would be completely transparent (invisible).  


|helpers
Example of how llSetText could be included in default code:
|also_functions
|also
|notes=Most commonly, this is included in the default code for an object, such as:
 
default
default
{
{
Line 51: Line 47:
}
}


|helpers
|also_functions
|also
|notes=Most commonly, this is included in the default code for an object (see example above).


}}
}}

Revision as of 12:12, 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).

Example of how llSetText could be included in default code: default {

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

Notes

Most commonly, this is included in the default code for an object (see example above).

Deep Notes

Search JIRA for related Issues

Signature

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