Loop background music over footsteps. Can't hear the footsteps.

Started by freeplayer, Fri 07/03/2014 17:13:31

Previous topic - Next topic

freeplayer

I added the code:
Code: ags

function room_RepExec()
{
     aRoommusic.Play();
}

Because I wish to have a loop of music in the Room. All works fine BUT:

1. The sound got very very bad, in quality. If I use the sound as
Code: ags

aRoommusic.Play();

It sounds perfect. If i use it in the code i gave first, with the loop function [function room_RepExec()] the sound got very worst.

2. The sound with the loop function [function room_RepExec()], is over the footsteps of the character sound, thus, I can't hear the sound of the footsteps any more.

In conclusion, if i use aRoommusic.Play(); everyting is fine (quality of music and also i can hear the footsteps), but, there is no loop in music.

Please, how can I solve this?

Thank you!

Slasher

Hi,

did you import it to the Music Folder?

If you imported it to the Sound folder then it will only play once.

Khris

Doesn't matter, you can set sounds to repeat, too.

freeplayer:
Commands inside the various repeatedly_execute functions are run each game loop, that's 40 times per second by default. Which means a new instance of the sound starts playing immediately after the first one, then another one, then a fourth, etc, until all sound channels are occupied.
Just go to the sounds properties in the editor and set the repeat style there.

freeplayer

Thank you both for the good info!
I've imported the ambient music into Music folder.
Than, clicked on the "track" and set the function DefaultRepeat to True.
Works fine now.

SMF spam blocked by CleanTalk