Main   Class List   Namespace List   Wiki

ScriptObject Class Reference
[ConsoleScripting]

A script-level OOP object which allows binding of a class, superClass and arguments along with declaration of methods. More...

Inheritance diagram for ScriptObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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.

Example:
new ScriptObject(Game)
{
   class = "DeathMatchGame";
   superClass = GameCore;
   genre = "Action FPS"; // Note the new, non-Torque variable
};
See also:
SimObject

Member Function Documentation

void ScriptObject::onAdd ( SimObjectId  ID  ) 

Called when this ScriptObject is added to the system.

Parameters:
ID Unique object ID assigned when created (this in script).
void ScriptObject::onRemove ( SimObjectId  ID  ) 

Called when this ScriptObject is removed from the system.

Parameters:
ID Unique object ID assigned when created (this in script).


Copyright © GarageGames, LLC. All Rights Reserved.