Author Topic: Where can I get started with torque?  (Read 1361 times)

I'd just like to learn how to make small addons, like keybinds and small modifications.
I tried downloading the "Torque Scripting Tutorial", but when I open it, it says it can't find the website.

It's good to start by looking at other addons and learning from that.

It's good to start by looking at other addons and learning from that.
That won't work because currently for me torque just looks like an angry seaman swearing

%!#$"&

That won't work because currently for me torque just looks like an angry seaman swearing

%!;$"&
It's funny because it's true.

Anyway, take a look at "Iban explains it all", it's a great tutorial.

It's funny because it's true.

Anyway, take a look at "Iban explains it all", it's a great tutorial.
Will do.

(I'm only a beginner at scripting, but not a complete novice)

The thing is, I looked at that tutorial.
It's easy to get the basic syntax. But the thing is, I didn't know names of certain functions and all that.
I knew how to do this:
Code: [Select]
function add(%num1, %num2)
{
      %ans = (%num1+ %num2);
}
But then I didn't know the function to detect when a client joins the game. I didn't know a lot of "things" also, such as this:
Code: [Select]
if(isObject[whatever variable])

According to my experiences, the basic syntax and arithmetic stuff is easy. The real problem is knowing names of functions and names of other things. If you want to know how to do certain things and need to know more function names, look at other add-ons and go here:

http://forum.blockland.us/index.php?topic=82294.0
http://forum.blockland.us/index.php?topic=139862.0
http://forum.blockland.us/index.php?topic=21753.0



^ isObject is a function not an array thus you have to do if(isObject(blah1337))
( instead of [

Also you don't have to put parentheses around your math if it's a single step operation

(I'm only a beginner at scripting, but not a complete novice)
A beginner wouldn't do this:

function add(%num1, %num2)
{
      %ans = (%num1+ %num2);
}

why did you put brackets around it, infact, why do you even need a function to do that?
Also you don't have to put parentheses around your math if it's a single step operation
%a*%c+%b^%d is perfectly valid.

%a*%c+%b^%d is perfectly valid.
Um, I know. What are you trying to say exactly

I don't know why but I've seen parenthesis around a lot of variable declarations lately.
But the bigger problem with the code is it won't really do anything; it doesn't output or return the result of the math.


The real problem is knowing names of functions and names of other things.
The real problem is learning how to put things together to do what you want. function and variable names can be obtained through many online or in-game sources.

If you want to know how to do certain things and need to know more function names, look at other add-ons and go here:
Those first two resources are horrible for many reasons

That won't work because currently for me torque just looks like an angry seaman swearing

%!#$"&
that's exactly what i think

%a*%c+%b^%d is perfectly valid.
I still to this date have know idea what ^ does in Torque.

I still to this date have know idea what ^ does in Torque.
I think it's a bitwise xor
« Last Edit: August 19, 2012, 10:30:26 PM by Headcrab Zombie »