Script tutorial docs don't match directory structure
by Justin Tolchin · in Torque Game Engine · 01/05/2005 (5:13 pm) · 6 replies
Hi all! Brand new to Torque and I have a quick question. I've been reading through the "Getting Started" stuff and I was doing ok until I got to this section:
Chapter 6. Scripting Tutorials
Part III. Torque Script
It seems to have been written for an earlier version of Torque (I'm just guessing here) because it refers to lots of things that don't exist in my version (1.3). Specifically, it says I need to add a line to "fps/server/game.cs" but I don't even have a directory called "fps".
There is a game.cs file under "example\starter.fps\server\scripts" and there's one under "example\tutorial.base\server" and there's one under "example\demo\server\scripts". Which directory am I supposed to be working from? I would have assumed the "tutorial.base" one but the flagpole files are only under the "demo" directory so maybe I'm supposed to work from there somehow? Or should I be copying stuff over? I'm confused. :-/
Similarly, there's the line:
exec("fps/examples/tutorial01/flagpole.cs");
and again I'd be happy to move that file from the demo subdirectory to wherever it's supposed to go if necessary, but there's only a flagpole.dts, flagpole.jpg, and flagpole.ms3d file. There's no .cs file. I can see there is a link to that file at the bottom of tutorial documentation page, but why isn't the .cs file already installed on disk?
Is there a doc update in the works? In any case, if anyone can point me in the right direction here I'd really appreciate it.
Thanks!
Chapter 6. Scripting Tutorials
Part III. Torque Script
It seems to have been written for an earlier version of Torque (I'm just guessing here) because it refers to lots of things that don't exist in my version (1.3). Specifically, it says I need to add a line to "fps/server/game.cs" but I don't even have a directory called "fps".
There is a game.cs file under "example\starter.fps\server\scripts" and there's one under "example\tutorial.base\server" and there's one under "example\demo\server\scripts". Which directory am I supposed to be working from? I would have assumed the "tutorial.base" one but the flagpole files are only under the "demo" directory so maybe I'm supposed to work from there somehow? Or should I be copying stuff over? I'm confused. :-/
Similarly, there's the line:
exec("fps/examples/tutorial01/flagpole.cs");
and again I'd be happy to move that file from the demo subdirectory to wherever it's supposed to go if necessary, but there's only a flagpole.dts, flagpole.jpg, and flagpole.ms3d file. There's no .cs file. I can see there is a link to that file at the bottom of tutorial documentation page, but why isn't the .cs file already installed on disk?
Is there a doc update in the works? In any case, if anyone can point me in the right direction here I'd really appreciate it.
Thanks!
#2
I guess I'll dig into the unofficial tutorials and try to combine all the pieces. :-)
Thanks for the reply though!
01/06/2005 (8:11 am)
I was afraid of that. :-/ I guess I'll dig into the unofficial tutorials and try to combine all the pieces. :-)
Thanks for the reply though!
#3
Watch in the coming weeks for another very big documentation content update... and some very exciting changes after that, which I wish I could sy more about right now.
01/13/2005 (4:11 am)
Most of the docs are not out of date. They are in very good shape for the most part. This small scripting tutorials chapter, and ch8 on Max are the only parts of the docs that really have any issue with being a little old. The reason we've allowed these two sections to get a crufty is because they will soon be replaced with *much* better content.Watch in the coming weeks for another very big documentation content update... and some very exciting changes after that, which I wish I could sy more about right now.
#4
On the page: http://www.garagegames.com/docs/torque/general/ch05s02.php it says:
"Copy the code from the box below into a simple text file. You can use your favorite code/text editor (GarageGames recommends JEdit). 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*."
I didn't see the part where we created the directory previously so I don't know where to put my scripts so that I can run them from the console.
Here's my question rephrased into a more general form:
When you are at the command prompt in the console, what is the present working directory (like in unix)? Or how do I use absolute and/or relative paths to locate .cs scripts using the exec() function?
01/29/2005 (12:39 pm)
I am having a similar problem with the documentation.On the page: http://www.garagegames.com/docs/torque/general/ch05s02.php it says:
"Copy the code from the box below into a simple text file. You can use your favorite code/text editor (GarageGames recommends JEdit). 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*."
I didn't see the part where we created the directory previously so I don't know where to put my scripts so that I can run them from the console.
Here's my question rephrased into a more general form:
When you are at the command prompt in the console, what is the present working directory (like in unix)? Or how do I use absolute and/or relative paths to locate .cs scripts using the exec() function?
#5
01/29/2005 (1:19 pm)
There is not one. Work relative to the executable. For instance, exec("starter.fps/main.cs");
#6
01/29/2005 (1:35 pm)
It works! thanks.
Torque 3D Owner Apparatus
And most of the docs are outdated, maybe we should wait for 1.4 to get a decent documentation to the engine? Forum ideas and solutions are good, but there;s the problem of version allways. Some work for tge 1.2 but not for the latest and so on.