Author Topic: Iban Explains it All  (Read 24048 times)

I was doing this a while ago but now that I can post in this forum again I feel it's time to reboot the project -- for the good of the Motherland.

This is a collection of TorqueScript related help documents for the aspiring scripter.

The Basics

Specific Classes

Specific Functions

Further Reading
  • The Torque Appendix - Contains very accurate information that is only usurped by the small number of changes Badspot has implemented. It's the same as the stickied PDF, but in HTML.


If you have any suggestions, requests, or complaints, tell me.
If you want to view the Google Docs folder, click here.
« Last Edit: March 08, 2011, 05:21:41 PM by Iban »

For the motherland, indeed!

These are really well written and not too hard to understand.  Nice job.

"Client/Server Commands" links to "Datablocks" and "ScriptObjects" links to nothing.

"Client/Server Commands" links to "Datablocks" and "ScriptObjects" links to nothing.
Gah, sorry. Google Docs is being a jerk.

Fixed.
« Last Edit: February 27, 2011, 03:05:17 PM by Iban »

Very well made. I'll make sure to link random people to these whenever it's relevant.

For "operators and variables", one interesting thing non-existant arrays can do that you can't do normally is use variables with spaces or accented letters:

$foo["two words"] = "hello";
==> echo($foo["two words"]);
hello
==> echo($footwo words);
Syntax error in input


Whether that's too far for a basic introduction is up to you, though.

Also the example says echo($a @ $b); for the "NL" operator.
« Last Edit: February 27, 2011, 03:21:12 PM by Space Guy »

Very well made. I'll make sure to link random people to these whenever it's relevant.

For "operators and variables", one interesting thing non-existant arrays can do that you can't do normally is use variables with spaces or accented letters:

$foo["two words"] = "hello";
==> echo($foo["two words"]);
hello
==> echo($footwo words);
Syntax error in input


This does mess up if you try to export it, though.

That is the quirkiest thing I have ever seen in the engine, and Torque has some serious quirks.

$X["1 2"] = 3;
export("$X*", "config/$X.txt");


The contents of $X.txt are:

Code: [Select]
$X1 2 = "3";
Which, as you said, if executed causes a syntax error. That's an untouched script generated by the engine causing a syntax error within itself. Amazing. Torque makes me giggle sometimes.

Guide on Packaging added.

Very nice. Keep it up. C:

I thought the datablock limit got raised to 4096 somewhere along the way.

I thought the datablock limit got raised to 4096 somewhere along the way.
If you can find a reliable source that says that I will gladly raise the limit.

Edit: Manty found the changelog. It is indeed 4096.
« Last Edit: February 28, 2011, 09:16:34 AM by Iban »

You should make a section on your website. I would definitely contribute.

Or even just a tutorial megathread?

This is fantastic. I'm going to read through this and see what more I can learn. Thanks alot, Iban.

You should make a section on your website. I would definitely contribute.

Or even just a tutorial megathread?

Meathreads never last...

Maybe you should stop eating them.

Maybe you should stop eating them.
Well, megathreads DO have more calories than normal threads. :o