Combined Music and Sound Effect

Started by Ghostlady, Wed 05/09/2007 02:02:54

Previous topic - Next topic

Ghostlady

I would like a room to play music when entered but also have the crackle of fire in the background.  Is there an easier way to do this in AGS without having to blend the music and fire into one music file?

Also, I've noticed with version 2.72, my music is broken for a second when changing rooms.  Is there a way to eliminate that?
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

VK Dan

You can use Sound Effects by placing the WAV (or MP3 or whatever) files in a Sound subfolder in your game folder. You name them the same way you name the music files (e.g Sound1.wav, Sound2.wav, etc).

You can play the sounds with the PlaySound() and PlayAmbientSound() functions.

Ghostlady

PlayAmbientSound does looping.  That's what I needed.  Thanks.

In reference to the music break when changing rooms, it is more of a crack in the music.
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven Plantation
Haunting at Cliffhouse

GarageGothic

The break in music happens in most hi-res games due to a framerate drop while the game loads the room. Especially if you also have a RawSavescreen() or similar CPU heavy command in the player_enters_room event. If you are running a lot of commands in player_enters_room event, you could try putting a Wait(1) between them to let the system proceed to the next cycle.

You will find that this happens less frequently on faster computers.

SMF spam blocked by CleanTalk