ScriptGroup

consoledoc.h

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

More...

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.

// 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";
     };
  };
};

Callbacks

onAdd(SimObjectId ID)

Called when this ScriptGroup 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).