The Windows version of AGS supports all DirectX-compatible sound cards. The DOS version of AGS supports Adlib, Sound Blaster and General MIDI for background music, and it supports the Sound Blaster and ESS Audiodrive for sound effects.
For background music, AGS can use OGG, MP3, MIDI, WAV, MOD, XM, IT and S3M music files. For sound effects, you can use OGG, MP3, WAV and VOC files.
When AGS needs to play music number X, it will search for the files in the following order. The first file it finds, it plays: MUSICx.OGG, MUSICx.MP3, MUSICx.WAV, MUSICx,MID, MUSICx.MOD, MUSICx.XM, MUSICx.S3M, MUSICx.IT
TIP: What is ogg? OGG is a digital music format, similar to MP3, but achieving better compression and higher quality. More importantly, it is a totally free format so no royalty payments or licenses are required to use it. For more information and programs to encode your music to OGG, see http://www.vorbis.org/
When the game loads, music 0 will be played if it exists in the game directory. You can change the music later by setting "Play music on room load" in a room, by using the PlayMusic script command, or by using the "Play music" interaction command.
To play a sound effect during the game, you can use the PlaySound script command, or the "Play sound" interaction command. The game will search for SOUNDx.OGG, SOUNDx.MP3, SOUNDx.WAV and SOUNDx.VOC, where X is the sound number.
NOTE: WAV, MP3 and OGG music files are not included in the game EXE, but are instead bundled into a seperate file called MUSIC.VOX. Whenever you add any new music files of those types to your game folder, you need to choose "Rebuild VOX Files" from the Game menu in order to update the store and make them work in-game.
NOTE: The Adlib sound card only supports MIDI music. It cannot play sound effects, or MOD, XM, OGG or MP3 music.
ego: "Hi! How are you?" david: "I'm fine."Normally this would display the words in the speech text above the characters heads. However, you can add the special character '&' to symbolise that a voice file should also be played. The file name is made up of the first four letters of the character's script name, then an ID number. For example,
ego: &10 "Hi! How are you?" david: &7 "I'm fine."This would play EGO10.WAV with the first line, and DAVI7.WAV with the second. When a line of text has a voice linked to it, the text on the screen will not be removed until the voice file has finished playing. If the player interrupts it by clicking the mouse or pressing a key, the text and voice will be stopped.
You can also use speech with Say script function.
character[EGO].Say("&10 Hi! How are you?"); character[DAVID].Say("&7 I'm fine.");NOTE: WAV, OGG and MP3 format files can be used for speech.
IMPORTANT: If you add or update any voice files, you need to click the "Rebuild VOX files" option on the Game menu of the AGS Editor, which will combine them into the speech file used in the game. This file is called SPEECH.VOX and is seperate from the rest of your game data so that you can offer it as an optional extra download to the player. The game will function correctly if the file is not present.
SeeAlso: SetVoiceMode script function.
Browser Based Help. Published by chm2web software. |