Newbie question
by Austin Reynolds · in General Discussion · 08/06/2007 (9:05 pm) · 5 replies
Please remeber I am a COMPLETE noobie. And will be asking some pretty basic questions for next couple weeks. Ok heres the deal I have bought tge 1.5 and have the newest update which I belive is 1.5.2, I also bought the book 3d programming all in one. If any of you have noticed the setup is a bit different from what I can see, as far as how the scripts are layed out and what not.
So heres what im trying to do REAL SIMPLE...
I have the tutorial.base folder and in there is a main.cs file. In the book it says add
function main()
// ----------------------------------------------------
// Entry point for the program.
// ----------------------------------------------------
{
print("Hello World");
}
and it should print at the top, well mine dont. where should this be going?
Thanks,
Austin
So heres what im trying to do REAL SIMPLE...
I have the tutorial.base folder and in there is a main.cs file. In the book it says add
function main()
// ----------------------------------------------------
// Entry point for the program.
// ----------------------------------------------------
{
print("Hello World");
}
and it should print at the top, well mine dont. where should this be going?
Thanks,
Austin
About the author
#2
If you have a look in your console when running the tutorial.base, (accessed by pressing the '~' key), you should see your message. The print command prints out to the console, it doesn't print it into the game itself.
The contents of the console are also accessed in the file console.log in your root ./ directory.
In terms of displaying the text on screen, the main way is through the gui editor (F10) as your pointed out and creating a text ctrl. You can then access the text ctrl later on in script and change the contents of the message.
Hope that makes sense :)
Some good information is also available on the TDN - tdn.garagegames.com/wiki/Torque_Game_Engine and of course in the book you purchased!
08/06/2007 (11:13 pm)
Hi Austin,If you have a look in your console when running the tutorial.base, (accessed by pressing the '~' key), you should see your message. The print command prints out to the console, it doesn't print it into the game itself.
The contents of the console are also accessed in the file console.log in your root ./ directory.
In terms of displaying the text on screen, the main way is through the gui editor (F10) as your pointed out and creating a text ctrl. You can then access the text ctrl later on in script and change the contents of the message.
Hope that makes sense :)
Some good information is also available on the TDN - tdn.garagegames.com/wiki/Torque_Game_Engine and of course in the book you purchased!
#3
08/06/2007 (11:36 pm)
If you want something to display on the screen (not in the console) the easiest way is to use a gui
#4
08/07/2007 (5:00 am)
The book you have is using an older code base and the command "print" has been replaced by "echo". Try echo("Hello World!"); and it should work. As Gavin said it will print "Hello World!" in the console.
#5
I was worried I was going to have that problem with the book and the updated version of torque. See in the book he just just print("TEST"); and it actually prints directly to the top left hand corner of the screen. But I did check and it is printing to the console.
So I'll go back to messing with the scripts and come back if I cant figure something out again :)
Again Thanks,
Austin
08/07/2007 (8:04 am)
Thank you for the replies guys :)I was worried I was going to have that problem with the book and the updated version of torque. See in the book he just just print("TEST"); and it actually prints directly to the top left hand corner of the screen. But I did check and it is printing to the console.
So I'll go back to messing with the scripts and come back if I cant figure something out again :)
Again Thanks,
Austin
Torque Owner Austin Reynolds