Game Development Community

Dynamic Texts, and output box

by Paul Stubbs · in Torque Game Builder · 05/20/2006 (7:44 pm) · 1 replies

I'm trying to create a risk game and there are two things that I can't find any information about doing.

One is having each state (I'm doing United States map) have an army counter. That means each state need's it's own dynamic unit counter that I can edit through script. How would I make that?

Another thing that'd be cool to do would have a small console-like window at the bottom of the screen that outputs what people are doing. For example if I attacked a bot it might output in the window:

Woad has attacked RedBot in territory Washington...
RedBot has lost the game...

and so on, how would I do that? With the gui editor?

About the author

Recent Threads


#1
05/26/2006 (12:24 pm)
Yes, you would need to create a GUI that contained a GuiTextCtrl (make sure to give it a name so you can refer to it in code). You would have to tell that control's text to update whenever you wanted it to update what was going on. You would do that in your actual game code by calling it like so:

controlName.setText("text goes here");

also, if you want to get the value of whatever text control you have in your gui you would do:

controlName.getValue();

good luck!