Torque 3D - Script Manual: ScriptGroup Class Reference

TorqueScript

Main   Class List   Namespace List   Online

ScriptGroup Class Reference
[ConsoleScripting]

Essentially a SimGroup, but with onAdd and onRemove script callbacks. More...

Inheritance diagram for ScriptGroup:

List of all members.

Public Member Functions

Callbacks

void onAdd (SimObjectId ID)
 Called when this ScriptGroup is added to the system.
void onRemove (SimObjectId ID)
 Called when this ScriptObject is removed from the system.

Detailed Description

Essentially a SimGroup, but with onAdd and onRemove script callbacks.

Example:
// First container, SimGroup containing a ScriptGroup
new SimGroup(Scenes)
{
   // Subcontainer, ScriptGroup containing variables
   // related to a cut scene and a starting WayPoint
   new ScriptGroup(WelcomeScene)
   {
      class = "Scene";
      pathName = "Pathx";
      description = "A small orc village set in the Hardesty mountains. This town and its surroundings will be used to illustrate some the Torque Game Engine's features.";
      pathTime = "0";
      title = "Welcome to Orc Town";

      new WayPoint(start)
      {
         position = "163.873 -103.82 208.354";
         rotation = "0.136165 -0.0544916 0.989186 44.0527";
         scale = "1 1 1";
         dataBlock = "WayPointMarker";
         team = "0";
      };
   };
};
See also:
SimGroup

Member Function Documentation

void ScriptGroup::onAdd ( SimObjectId  ID  ) 

Called when this ScriptGroup is added to the system.

Parameters:
ID Unique object ID assigned when created (this in script).
void ScriptGroup::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.