Game Development Community

Creating textobject with script

by Chris J · in Technical Issues · 11/15/2008 (8:40 am) · 1 replies

I'm using the torque game builder, anyone know how to do this?

also any good references on torque script?

About the author

Recent Threads


#1
12/21/2008 (12:03 am)
Not sure if this is what you need, but you can output text like this (this is an example of a timer):

// Time-check
   if( %timeLeft < 0 )
   {
      %this.setScenePause( true );
      MoleGuiGameOver.visible = 1;
      %timeLeft = 0;
   }    
   
   // Update the GuiTextCtrl
   MoleGuiTimer.text = "Timer:" SPC %timeLeft ;

This displays "Timer" then a space and then the value of the variable timeLeft.