ScriptObject
A script-level OOP object which allows binding of a class, superClass and arguments along with declaration of methods.
Callbacks
void
onAdd(SimObjectId ID)
Called when this ScriptObject is added to the system.
void
onRemove(SimObjectId ID)
Called when this ScriptObject is removed from the system.
Detailed Description
A script-level OOP object which allows binding of a class, superClass and arguments along with declaration of methods.
ScriptObjects are extrodinarily powerful objects that allow defining of any type of data required. They can optionally have a class and a superclass defined for added control of multiple ScriptObjects through a simple class definition.
new ScriptObject(Game) { class = "DeathMatchGame"; superClass = GameCore; genre = "Action FPS"; // Note the new, non-Torque variable };
Callbacks
onAdd(SimObjectId ID)
Called when this ScriptObject is added to the system.
Parameters:
ID | Unique object ID assigned when created (this in script). |
onRemove(SimObjectId ID)
Called when this ScriptObject is removed from the system.
Parameters:
ID | Unique object ID assigned when created (this in script). |