Text (TeaScript)

From Moondust Wiki
Jump to navigation Jump to search

Text is a class in TeaScript.vbs that allows you to read/write values for text. To read the value of a text do:

Text(id).name

id is identifier used for Texts, you define it when making a new text. Note that 'name' is not case-sensitive.


To change the value of text do:

Text(id).name = value

To learn how to make a new text object use the function TxtCreate: http://wohlsoft.ru/pgewiki/Functions_(TeaScript)#TxtCreate

Type Name Read/Write Description
double x - -
double y Read Only -
double z Write Only -
Name Description
X The X-coordinate of the text.
Y The Y-coordinate of the text.
Text The text shown. Note, this field is a string.
Hide 0: Show text; 1: Hide text
Zpos Stands for the z position of the text
Color Stands for the text color
Width the number of characters of a single row in the NPC image file.
Height No idea about the effect.
Foreground Set this to 0 and the text created will be hidden. Set this to 1 and the text will be visible.