All pages in category

Alternatives to TorqueScript Last updated 14 Oct 2016 01:13 by johxz
Please note that the *solutions* here are expert level engine code changes, these alternatives are not simple plugins to replace torquescript

Getting started with AIPlayer Last updated 09 Jul 2016 23:00 by johxz
This tutorial will walk you through using the basic AIPlayer class that copmes with T3D. The code for AI tends to be very specific to your game and its genre which makes it hard for Torque to implement anything general purpose.
script-templates torquescript tutorial

The Torquescript References Last updated 13 Jan 2016 02:55 by Mud-H
Torque 3D Reference Manual

Engine configuration and preferences Last updated 26 Jul 2015 01:56 by buckmaster
Torque 3D takes most of its configuration through 'the console'. This is often in the form of assigning global variables in TorqueScript. Global variables are also used, in the stock templates, to save user preferences.

Controlling framerate when the window is unfocused Last updated 26 Jul 2015 01:56 by buckmaster
Torque exposes a configuration variable, $Platform::backgroundSleepTime, which can be used to control the game's update rate when it is not the focused window. By default it is set to 200ms, which means you'll get about 5 FPS when the window is in the background. By setting it to 0, you can force your game to run at full speed when the window is in the background. This is helpful for testing multiplayer locally with two instances of a game!
reference

Creating ribbons Last updated 25 Jul 2015 02:08 by buckmaster
As of version 3.7, there is a Ribbon class in the engine that lets you create beam and trail visual effects. Note that the code in 3.7 is slightly different to the version presented here, but the effect is the same.

Variables Last updated 29 Apr 2015 09:38 by LukasPJ
Local variables are variables that can be accessed only within the function or block that they are defined. Local variables are defined in torque as %somevar.

Logical Statements Last updated 29 Apr 2015 09:37 by LukasPJ
Everything in TorqueScript is strings!
This is important to remember with if statements, because in if statements you can either compare by int or by string.
To compare by string you should write $= instead of ==.
Example:

Functions Last updated 29 Apr 2015 09:37 by LukasPJ
Functions or procedures are one of the building blocks of Torque scripts. Many elements of game logic involve writing callbacks, functions that are called when a specific event happens in the game.

The TorqueScript language Last updated 02 Jan 2015 02:52 by buckmaster
TorqueScript is a custom scripting language used by the Torque family of engines. It has a C-like syntax, but is dynamically typed. It is mostly intended to be used to script gameplay logic callbacks, rather than performing complex AI or user interaction routines. In a way it acts as the 'glue' that attaches different pieces of the engine together to make your game.

Barebones scripting tutorial Last updated 28 Nov 2014 03:55 by buckmaster
This section contains tutorials for how to set up a completely skeletal template. The scripts and templates in this section also go by the name t3d-bones. This page is based on the tutorials originally found in this repository.
incomplete introduction t3d torquescript tutorial

Custom keybinds Last updated 28 Nov 2014 03:49 by buckmaster
So, you've made a new keybind, and as an example, let's say you've created a custom weapon and made a keybind for it.
torquescript tutorial

Schedules and timers Last updated 28 Nov 2014 03:45 by buckmaster
Torque has a couple of built-in functions to help you with timing events. Schedules are a way to defer an event to happen at some point in the future, and timers let you measure the time between known events.
torquescript tutorial

Destroyable objects Last updated 27 Nov 2014 23:22 by buckmaster
This tutorial will take you through the basics of creating objects that can take damage. You'll learn how to script health levels for objects, particles, sounds, and much more. This series is based on the damage and destruction tutorial series by Michael Hall, but has been updated for more recent versions of the engine.
stub torquescript tutorial

Coin collection game tutorial Last updated 22 Oct 2014 11:49 by LukasPJ
This tutorial series serves as a basic introduction to Torque3D in a practical way. It also serves a quick way to establish a very basic gameplay for your game and levels
introduction t3d torquescript tutorial

Xbox 360 Controller Setup Last updated 21 Oct 2014 10:25 by buckmaster
Tested using T3D MIT 3.6.1
gamepad input resource xbox

Script Hierarchy Last updated 06 Oct 2014 22:57 by LukasPJ
Torque3D has a seldom mentioned … or at least, not mentioned enough … hierarchy, and a very important hierarchy at that. Getting it wrong stops stuff from working and won't always give you a warning about it not working (eg: audio does not play).
script-templates t3d

Simple custom startup sequence Last updated 06 Oct 2014 22:56 by LukasPJ
How to script a custom startup (splash) screen sequence in the simplest way possible.
script-templates t3d

Simple speech for players Last updated 05 Oct 2014 22:57 by buckmaster
In working on AI stuff, I created a handy utility function to have AIPlayers make sounds based on a simple function call. Instead of remembering the names of SFXProfile datablocks and so on, I wanted to just call a function with a textual representation of what I wanted the character to say. I also wanted the system to be generic enough to handle different voice types.
resource torquescript

Fake aircraft, real airstrike Last updated 05 Oct 2014 13:48 by LukasPJ
Faking aircraft zooming overhead like all the cool FPS's have … but let's expand that and have fake aircraft deliver REAL airstrikes! In T3D using scripted objects, baffling 3D maths and raycasts.
resource t3d torquescript

page 1 of 212next »
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License