SOUND
SUPPORT
(SN)
RECEIVER
The SN Receiver lets you
play external or internal sound files at almost any type.
Attention!
If you try to play a sound, SN trigger will occur. So you can substitute even
a sound played by ERM.
There are some limitations. First, sound files
cannot be longer than 10 seconds. Longer sound files will only play the
first 10 seconds of sound. Second, when the game tries to play a sound it checks
whether it is already being played now. If yes, it just runs another copy. If
no, it loads the sound again. To search for the name it uses only the first 12
characters, assuming that the file is DOS based 8.3 and is loaced in the DATA
folder. So if you expect that the sound is played rarely, it is not a problem at
all, otherwise check it first.
!!SN:XXXX; |
Receiver lets you play sound files |
OPTIONS | |
S$; | Get/Check/Set the sound file name to a z variable. |
Pz#; | Play a sound file now named z#. (see Format SN) |
Here is a short tour of how to change sounds for
objects.
For example, we may want to change a sound when we visit a learning stone.
First we need a file with a new sound. We'll use a sound file named 1.wav in
this example. Then we need a "silent" file to avoid "resource not found" message
(you may find the ZQUIET.WAV file in the data folder).
Now place some learning stones on the map and add an ERM script:
***************
ZVSE
!?OB100; visit learning stone
!!VRz10:S^..\data\1.wav^; external WAVE or
82M file
!!SN:Pz10; Play it now !
!?SN; sound trigger
!!SN:S?z-10; store a sound file name
!!VRi:S0; !!VRz-9:S^Gazebo.wav^; !!VRi&z-10=z-9:S1;
learning stone?
!?SN&i=1; continue if learning stone
!!VRz-10:S^ZQUIET.WAV^; nothing just silence
!!SN:Sz-10; shut up !
Some sounds won't trigger !?SN, however, such as:
- casting Adventure Map spells other than View Air and View Earth
- building a building in a town,
- digging (for the Grail)
- start of combat
- combat screen battle sounds
- activating a cheat code
- being *near* a dwelling (e.g., monastery chanting, guardhouse ruckus, etc.) or
ANY other object (e.g., a windmill) where you can hear a sound file playing
[BTW, most of the AB dwelling (e.g., Enchanters, Rust Dragons), and the WoG
dwellings (even level 8) all have the same sound as the Barracks from what I can
tell from listening.]
- monolith teleport sound
- horse movement
- button clicking (e.g., clicking the Kingdom Overview button)