Quick TorqueScript questions
by Richard Skala · in General Discussion · 11/20/2009 (5:44 am) · 2 replies
In TorqueScript examples, I see two different ways to access folders. What are the differences between these two?
"~/gui/mainScreen.gui"
"./gameScripts/game.cs"
That is, what is the result of the tilde and the period before the paths?
Also, are there any good TorqueScript tutorials out there?
Thanks.
"~/gui/mainScreen.gui"
"./gameScripts/game.cs"
That is, what is the result of the tilde and the period before the paths?
Also, are there any good TorqueScript tutorials out there?
Thanks.
About the author
Founded in 2009, Pixel Vandals Inc. is focused on bringing fun, fresh, and new ideas to the iPhone. www.pixelvandals.com www.pixelvandals.com/vineking
Torque Owner Ryan Mounts
CornerstoneViz
"Game" is the root directory that holds your EXE and "main.cs". Every folder under the root directory is considered a "mod". So in this example, "scripts", "art", and "core" are all mod directories. Let's say there is a file called "init.cs" in the server directory above, and in "init.cs" it execs the two files you mentioned in your post. You can see that "init.cs" exists in the "scripts" mod directory; therefore,
"~/gui/mainScreen.gui" == "game/scripts/gui/mainScreen.gui"
The parent directory of "init.cs" is the "server" directory; therefore,
"./gameScripts/game.cs" == "game/scripts/server/gameScripts/game.cs