TriggerSoundAction - acrimi/Raven GitHub Wiki

TriggerSoundAction will trigger playback of a sound file when executed. The sound can either be a single predefined sound, or a list of possible sounds that will be chosen from at random.

Configuration

The following parameters can be used to configure the action's behavior:

Key Type Description
sound string The name of the sound file to play. Ignored if soundSet is defined.
soundSet string[] An array of sound file names. Upon execution, one of these files will be chosen at random and played.
volume float The volume that the triggered sound will play at. Defaults to 1.
loop boolean Whether or not the sound should play a single time or loop indefinitely. Defaults to false.
alias string An alias to assign to the sound being triggered. Can be used to later stop the specific sound triggered by this action.

Examples:

"eventName": {
  "action": "TriggerSoundAction",
  "sound": "rumble.wav",
  "volume": 0.6,
  "loop": true,
  "alias": "rockRumble"
}
"eventName": {
  "action": "TriggerSoundAction",
  "soundSet": [
    "attack1.wav",
    "attack2.wav",
    "attack3.wav"
  ],
  "volume": 0.5,
  "loop": false
}