Setting Prim Text
Every prim has text associated with it. For most prims this text is an empty string (“”). However, by using the llSetText function call, text can be assigned to a prim. This text will be displayed just above the prim, as seen in Figure 6.3.
Figure 6.3: Prim Text

The llSetText function has the following signature.
llSetText(string text, vector color, float alpha)
The first parameter, named text, specifies the text to be displayed. The second parameter, named color, specifies the color that the text is to be displayed in. Colors in Second Life are implemented using the vector data type. Colors are made up of red, green and blue components. These are mapped to the x, y and z-coordinates of the vector. The final parameter, named alpha, specifies the transparency of the text. A value of zero is completely transparent, whereas a value of one is completely solid.
Once a call to llSetText has been placed, the text will remain until it is cleared. To clear text the following function call is used.
llSetText("",<0,0,0>,0);The following function call would display “Hello” in bright red.
llSetText("Hello.", <1,0,0>, 1.0);The text property of a primitive provides a quick means to communicate textual information to all avatars around the prim.




