Torque 3D Game Development Cookbook
TorqueScript: The Only Script You Need to Know
Accessing delimited fields within a string
Iterating on words in a string list
Retrieving components of a variable using accessors
Iterating on objects in a SimSet or SimGroup collection
Getting a random object from a SimSet or SimGroup collection
Finding an object in a SimSet or SimGroup collection using its internal name
Executing a method on a SimSet or SimGroup collection
Creating a new SimObject instance
Creating a new internal name only SimObject instance
Creating a new Datablock object
Extending a SimObject instance using the class property
Using a variable to access methods or properties of a SimObject instance
Using call() to call a variable method on a SimObject instance with arguments
Using call() to call a variable function with arguments
Using script arrays as dictionaries
Using ArrayObject and custom script sorting callbacks
Activating and deactivating a package
Setting up fogging of the level
How to cover seams and texture changes using decals placed in the World Editor
Copying the transform of an object to another in the World Editor window
How to change the material of an object in the World Editor
Setting up a glow mask using the Material Editor window
Using a convex shape as a zone
Setting zone-specific ambient lighting
Grouping adjacent zones together
Creating a password text edit box
Using pushDialog() and popDialog() and setting up the UI file to work with them
Displaying metrics (such as FPS) from the console
Displaying a list of all game objects
Displaying a level at the main menu
Dragging and dropping between two windows
Locking and hiding the mouse while the right mouse button is down
Clicking on an object in the scene (client-side)
Clicking on an object in the scene (server-side)
Picking up an item in the scene while the mouse is locked and hidden
Changing the camera's view and control mode
Giving the camera smooth movement
Having the camera follow a path
Using the built-in video recording
Changing the material of a ShapeBase object using script
Building a custom material using advanced lighting
Playing a quick 2D or 3D sound on all clients
Using SFXEmitter to create networked sound effects
Playing a sound on a ShapeBase object
Playing music while a level is loading
How to have a background sound for a level
How to have music change according to the mood
Triggering an event during sound playback
Playing an animation sequence on a TSStatic class
Playing an animation sequence on a ShapeBase class
How to make it rain using a Precipitation object
Using the Lightning object to automatically create a thunderstorm
Using the TimeOfDay object to generate events
How to start a dedicated server
What ports are needed to be open or forwarded for a multiplayer server
Passing arbitrary parameters from the client to the server
How to become an admin on a server
Kicking and banning people from the server
Stopping a server from restarting when the last player leaves
Accessing the server connection from the client
How to access all client connections from the server
Broadcasting a message to all clients and having it displayed in the center of the screen
Sending a network event from the client to the server
Sending a network event from the server to the client
Using an RSS feed for game news, message of the day, or other client messages
How to activate, deactivate, and use Telnet for console access
Miscellaneous Gameplay Features
How to have a sprinting player use up energy
Enabling and disabling air control
Adjusting the fire spread of a weapon
Changing the number of shots fired from a weapon
Making a weapon use energy rather than ammo