A unit has three events which play sounds: movement, firing weapon and destruction. ASC has two methods for specifying these unit sounds.
Here is an example of a unit having individual sounds:
vehicletype { ... MovementSound = someFile.wav KillSound = scream.wav Weapons { Weapon0 { Sound = shoot.wav ... } weapon0 ... } Weapons } vehicletype
It is possible to have define the sounds for whole groups of units. This is done in the file sounds.asctxt
A simple example is:
shoot.cruisemissile.files = weapon00.wav
This causes the file weapon00.wav to be played when a cruise missile is fired.
It is possible to define more than one sound file:
shoot.cannon.files = weapon07.wav weapon07b.wav
shoot.cannon.labels = default very_big_cannon
If a cannon is fired, weapon07.wav will be played. But some units may specify that their cannon should play weapon07b.wav . This is done by adding Sound = very_big_cannon to the weapon definition. The Sound is the same entry as the one where a filename for an individual sound is specified. The distinction between fileName and soundLabels is done by looking for a dot (.) in the entry. If there is a dot, the entry is treated as filename; if there is no dot, it's a label.
These alternative sounds can also be specified for unit movement ( MovementSound = sound_label in vehicletype ) and the kill sounds ( KillSound = sound_label in vehicletype ).
Since ASC 2.0 it is possible to have a special beginning sound, which is useful for unit movement:
move.light_aircraft.files = enginestart.wav:move_jet.wav
First the enginestart.wav will be played, once this is finished the sound move_jet.wav will be played and looped until the unit movement is finished.
Also new in ASC 2.0 is the usage of height specific sounds. The level of height on which the unit started its movement will be used for the whole movement operation. Just use these names as labels for unit sounds: "deep_submerged", "submerged", "floating", "ground_level", "low_level_flight", "medium_level_flight", "high_level_flight", "orbit" .
In ASC2 the sound files can be in many different formats, with WAV, MP3, OGG and FLAC being the most common ones. The usage of OGG is strongly recommended, as it is as space efficient as MP3, but works on all systems, which MP3 does not (some Linux distributions don't come with an MP3 decoder by default to avoid its license fees).
Last change: Mon, 2006-08-14 5:38