Sound
Filter
A DSA can be triggered whenever one of the standard internal sounds is
internally initiated.
This DSA will receive the following parameters:
- ( 0 ) The Sound Number ( see Sound
Numbers )
- ( 1 ) Volume ( -1=no sound, 0=low, 1=high )
- ( 2 ) Distance to party squared
- ( 3 ) Sound Source Level
- ( 4 ) Sound Source X ( relative )
- ( 5 ) Sound Source Y ( relative )
- ( 6 ) Game Volume setting
- ( 7 ) No Sound flag
- ( 8 ) Distance to party in units of 0.01. Example: 1 north
and 1 west gives distance = 141.
If a Sound Filter is configured to receive sound notifications then the
information will be passed to the Filter and the sound itself
** WILL NOT BE SENT TO THE SPEAKERS **.
This means that the Filter MUST reinitiate the sound with an
'&SOUND' command using the first two parameters (Don't forget to
negate the 'Sound Number'}. Of course,
the filter may wish to change the sound or volume or not make the sound
at all, depending on whether or not the party has recovered from the
'Deafness' spell cast by that Vexirk on level 5. The sounds
produced by the &SOUND command are not passed to the Sound Filter,
so there is no fear of infinite recursion.
This behaviour is a bit different from the other filters which allow
the filter to modify parameters before the action occurs. The
built-in sounds of the game do not pass by the Sound Filter on their
way to the speakers. These sounds actually pass THROUGH the Sound
Filter.