afxAudioBank

consoledoc.h

A datablock that specifies an Audio Bank effect.

More...

Public Attributes

SFXDescription datablock to use with this set of sounds.

string
filenames [32]

Up to 32 names of sound files found in the path folder. The sound that is actually played by an Audio Bank effect is determined by the playIndex field.

filename

A filesystem path to the folder containing the sound files specified by the filenames[] field. All sound files used in a single AudioBank must be located in the same folder.

int

An array index that selects a sound to play from the filenames[] field. Values outside of the range of assigned filename[] entries will not play any sound.

bool

If set to true, file is pre-loaded, otherwise it is loaded on-demand.

Detailed Description

A datablock that specifies an Audio Bank effect.

afxAudioBank is very similar to the stock Torque SFXProfile datablock but it allows specification of up to 32 different sound files. The sound that actually plays is determined by the playIndex field.

afxAudioBank is most useful when used in combination with field substitutions, whereby a substitution statement assigned to playIndex selects a different sound (perhaps randomly) each time the effect is used.

Public Attributes

SFXDescription description 

SFXDescription datablock to use with this set of sounds.

string filenames [32]

Up to 32 names of sound files found in the path folder. The sound that is actually played by an Audio Bank effect is determined by the playIndex field.

filename Path 

A filesystem path to the folder containing the sound files specified by the filenames[] field. All sound files used in a single AudioBank must be located in the same folder.

int playIndex 

An array index that selects a sound to play from the filenames[] field. Values outside of the range of assigned filename[] entries will not play any sound.

bool preload 

If set to true, file is pre-loaded, otherwise it is loaded on-demand.