Torque Game EngineTorque Game Engine Documentation
Version 1.3.x

LightningData

LightningData also derives from GameBaseData, and is used by Lightning objects to produce some fairly sophisticated lightning effects. Even though the Torque Game Engine's lightning effects are robust, the LightningData datablock itself is fairly simple; its fields are detailed in the table below.

Table D.14. LightningData Member Fields

Field NameTypeDefault ValueDescription
strikeSoundAudioProfilePtrNULLPoints to the AudioProfile used to produce the sound for lightning strikes. If specified, must point to an object of type AudioProfile. Must adhere to the semantics associated with AudioProfilePtr, as defined in the Torque Game Engine.
thunderSounds (array)AudioProfilePtr [MaxThunders]NULLArray of pointers to AudioProfiles used to produce the sounds for lightning strikes. If specified, must point to an object of type AudioProfile. Must adhere to the semantics associated with AudioProfilePtr, as defined in the Torque Game Engine.
strikeTexturesString (array)[MaxTextures]Array of texture names to be used when rendering lightning strikes. The engine presently only uses the first texture name supplied.

As you can see, the LightningData datablock is simple. Yet, Torque has wonderful support for lightning functionality, as can be seen in many of the tutorials and guides for Torque or the Mission Editor. The engine simply handles much of the lightning functionality on its own, without requiring much data from a datablock.

In the next section, we examine another weather-related datablock, PrecipitationData.