Game Development Community

Scripting language syntax

by Massimo Loi · in Torque Game Engine · 06/20/2002 (1:23 pm) · 2 replies

Hello all,
I've been looking for the scripting language syntax. The closest I found was a Word document that documents the functions accessible from within the script. It's a great document, it explains how some things are declared as well as the reserved words... unfortunately it does not show the syntax for loops, etc...

I thought there was a page with that information, but I can't seem to find it. I searched the forums to no avail. Incidentally if such a document does not exist, can anyone tell me how for and while loops are declared in the script? I tried the c++ way but it gives me errors. For example, my for loop looks like: "for (i=0; i<360; i++)" and I get an error saying "for (i=##0##; i<360; i++)"

I'm obviously doing something wrong... (and yes, I made sure that that's a zero and not an oh :))

One last question, does this scripting language have a name?

Thank you all in advance,
-Mass

About the author

Recent Threads


#1
06/20/2002 (1:51 pm)
There used to be a quick reference, but I can't find it at the moment.

As for your loop, local variables in the script are prefixed with %, and global variables with $.

So:

for (%i=0; %i<10; %i++)
{
   ...
}

I think it's just called the Torque scripting language.
#2
06/20/2002 (2:10 pm)
Look in the Torque SDK Getting Started article. There is a link to the Torque Script documentation.

Jeff Tunnell GG