Package_test.cs
by Noah Dyer · in Torque Game Engine · 10/10/2005 (12:09 pm) · 0 replies
Just a few notes from a confused novice Torque developer that might improve the documentation. I was having problems with the scripting tutorial regarding packages found at http://www.garagegames.com/docs/tge/general/ch05s02.php. A quick search revealed that I was experiencing the same problem as the gentleman who created this post, http://www.garagegames.com/mg/forums/result.thread.php?qt=21074.
There are a few things that might make it easier to complete this tut. The text says,
Save the code as a new file called "package_test.cs" and save it in the "test_scripts" sub-directory of the example directory we created previously *INSERT LINK*.
Once you've done that, load the script you just created by opening up the TGE Console and typing
exec(test_scripts/package_test.cs);
1. The TorqueDemo application needs to be closed and reopened after creating package_test.cs in order for the application to know that it exists.
2. The test_scripts directory needs to be created, but the tut doesn't say so explicitly. Personally, I spent a long time searching for the directory, and when I couldn't I tried saving the file in a whole bunch of different places that didn't work, as well as changing the command line to exec(test_scripts/package_test.cs); none of which worked. I'm not sure if the directory structure has changed since thread 21074, but I used the default file structure, and in order to get the results Ed mentions I had to create C:\Torque\SDK\example\starter.fps\test_scripts. He doesn't list the SDK folder.
3. The command line needs to be changed to exec("starter.fps/test_scripts/package_test.cs"); as Ed describes.
4. Perhaps someone intended for INSERT LINK to be an active hyperlink?
Other than those 3 clarifications on that particular tut, the documentation has been great so far.
There are a few things that might make it easier to complete this tut. The text says,
Save the code as a new file called "package_test.cs" and save it in the "test_scripts" sub-directory of the example directory we created previously *INSERT LINK*.
Once you've done that, load the script you just created by opening up the TGE Console and typing
exec(test_scripts/package_test.cs);
1. The TorqueDemo application needs to be closed and reopened after creating package_test.cs in order for the application to know that it exists.
2. The test_scripts directory needs to be created, but the tut doesn't say so explicitly. Personally, I spent a long time searching for the directory, and when I couldn't I tried saving the file in a whole bunch of different places that didn't work, as well as changing the command line to exec(test_scripts/package_test.cs); none of which worked. I'm not sure if the directory structure has changed since thread 21074, but I used the default file structure, and in order to get the results Ed mentions I had to create C:\Torque\SDK\example\starter.fps\test_scripts. He doesn't list the SDK folder.
3. The command line needs to be changed to exec("starter.fps/test_scripts/package_test.cs"); as Ed describes.
4. Perhaps someone intended for INSERT LINK to be an active hyperlink?
Other than those 3 clarifications on that particular tut, the documentation has been great so far.