Torque Game Engine DocumentationVersion 1.3.x |
We have finished detailing the datablocks which derive from ShapeBaseData, and now return to the GameBaseData family tree. The TriggerData datablock is one of the most commonly used in Torque. Triggers provide a convenient, automatic way to perform actions in response to player behavior. For more details on Triggers, see the Triggers Tutorial.
As far as the datablock goes, TriggerData is fairly simple. It derives from GameBaseData and so has the standard category and className fields. Beyond those, TriggerData defines only one new field.
Table D.10. TriggerData Member Fields
| Field Name | Type | Default Value | Description |
|---|---|---|---|
| tickPeriodMS | Integer | 100 | The frequency, measured in milliseconds, at which to update the Trigger's behavior, while it is active. The Trigger is active if and only if a GameBase-derived object lies inside it. |
TriggerData's single field provides all the data necesarry to create a functioning behavior trigger in a Torque application. Of course, the operations to perform when the Trigger is active must be provided as well. Again, see the Triggers Tutorial for more information.
In the next section, we examine the ProjectileData datablock.