-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Scripting Tutorial
MichPerry-GG edited this page Mar 19, 2013
·
32 revisions
This guide will take you through the process of creating a basic script for Torque 2D.
The following guide(s) are recommended before you begin this tutorial:
The following guide(s) are useful to have available while completing this tutorial:
What you need
- A local checkout of of Torque 2D
- A text editor. Generally, any text editor will work fine as long as it does not introduce whitespace symbols. Avoid any advanced word processor, such as Microsoft Word. Recommended editors include, but are not limited to:
- Windows: Torsion, Notepad++, Visual Studio
- OS X: Xcode, TextWrangler, TextEdit (in "no formatting" mode)
What is a script?
Creating the file.
Loading the file into the engine.
Local vs Global. Variables vs Objects.
Stand-alone functions.
Functions attached to objects.
Functions called from the engine source.
Uniquely named objects in script.
Isolating code to packages.
Finally...