Do you know any C++? It's basically like that, except much simpler, and there's only one variable type. Once you buy the engine you get access to the TorqueScript documentation which in a few pages explains everything you need to know. Not very hard to pick up at all, it's just how the file structure is set up and operates with the client and server side scripts that will take a while.
Here's a sample from commands.cs in the FPS starter kit, which contains some server commands that are called when the client sends a message to the server that it has done something, like commit suicide.
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Misc. server commands avialable to clients
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
function serverCmdToggleCamera(%client)
{
%control = %client.getControlObject();
if (%control == %client.player)
{
%control = %client.camera;
%control.mode = toggleCameraFly;
}
else
{
%control = %client.player;
%control.mode = observerFly;
}
%client.setControlObject(%control);
}
function serverCmdDropPlayerAtCamera(%client)
{
if ($Server::TestCheats || isObject(EditorGui))
{
%client.player.setTransform(%client.camera.getTransform());
%client.player.setVelocity("0 0 0");
%client.setControlObject(%client.player);
}
}
function serverCmdDropCameraAtPlayer(%client)
{
%client.camera.setTransform(%client.player.getEyeTransform());
%client.camera.setVelocity("0 0 0");
%client.setControlObject(%client.camera);
}
//-----------------------------------------------------------------------------
function serverCmdSuicide(%client)
{
if (isObject(%client.player))
%client.player.kill("Suicide");
}
function serverCmdPlayCel(%client,%anim)
{
if (isObject(%client.player))
%client.player.playCelAnimation(%anim);
}
function serverCmdPlayDeath(%client)
{
if (isObject(%client.player))
%client.player.playDeathAnimation();
}
I'm going to eat you!