Game Development Community

1.1.3 New text Object Impressions (can you change text ingame?)

by Leroy Frederick · in Torque Game Builder · 11/30/2006 (9:54 am) · 3 replies

Hiya all,

Well thus far, all good, no problems with 1.1.3 upgrade and the align tool is v useful, well done gg!

I've been testing out text object tool, but i can't seem to find a way of changing the text outside the level editor (in game). Is this intentional? I've .dump() it, and unless i've missed it, there seems to be no setText() or any other text change command.

Thanks in advance! :0)

EDIT: Oh, can you bold/italic/underline the text object too, or am i going well ahead of it's means?

#1
11/30/2006 (10:13 am)
The text object just has a whole bunch of accessors. Check the new docs (Reference -> TGB Reference) and do a search for text object. The fields down there (like text) can be set directly. For instance, to change the text, simply do
%myTextObj.text = "Different!";
#2
11/30/2006 (10:32 am)
Oh, i only had a quick look through the documented help, so i totally missed that and forget to look in there for it :S, so theoretically speaking, currently the supplied documentation is newer then the TDN reference documentation. Nice one Tom, thanks. No this object looks all the more useful ;)
#3
11/30/2006 (11:54 am)
In some ways, the new docs are quite a bit ahead of TDN (like TGB Reference - I added a lot of methods to it), but TDN also has a lot of extra tutorials.