98 — Play Sound Effect (Random)...
Plays a sound effect at a randomly chosen waypoint among those the scenario places.
Editor data
- Numeric ID
98- Engine ID
TACTION_PLAY_SOUND_RANDOM- Editor name
- Play Sound Effect (Random)...
- Need token
NEED_SOUND- Parameters
- Sound
sound
- Sound
- Attachment
- none
INI example
[Actions]
<TriggerID>=1,98,0,<Sound>,0,0,0,0,With no waypoint placed
Section titled “With no waypoint placed”Place at least one waypoint before using this action. In a scenario with no placed waypoint, the action still picks a position for the sound. About half the time it is cell 0,0, and otherwise an arbitrary position taken from unrelated memory. The sound is heard only if that position is within range of the view.
Caveats
- Every waypoint the scenario places can be chosen, including the home, reinforcement and special waypoints. Waypoints the scenario does not place are skipped.
- The sound is a [placed sound](/systems/sound-effects/#placed-sounds), so it fades and pans with the chosen waypoint's position relative to the view.
- The waypoint is drawn from the game's synchronized random numbers, so every machine in a multiplayer game chooses the same waypoint.
- Leave at least one of the waypoints
0through100unplaced. The action has room for 100 waypoints, and in a scenario that places all 101 it writes past the end of its list, which can corrupt memory.