Sound problems

Started by Blue, Wed 25/06/2008 09:31:53

Previous topic - Next topic

Blue

I have a problem regarding sound in my game.
When entering room 4 to room 8, I want the same ambient sound to play. So far I'm stuck in the middle of two options:

•Option 1: I can use PlaySound or PlaySoundEx, which plays continually as I walk through the rooms, without starting over. But I can't make it repeat itself.

•Option 2: I can use PlayAmbientSound, which makes the sound loop, but it stops abruptly when I leave the room.

I'm using a rather old version of AGS (version 2.71), so maybe it isn't possible to accomplish what I need.
Any ideas how to work around this? Or is it possible that there is a way to solve it, that I just haven't discovered?



Khris

Why don't you use PlayMusic?

If for some reason you can't use it, try:
Code: ags
// rep_ex
  if (player.Room>=4 && player.Room<=8 && !IsSoundPlaying()) PlaySoundEx(...);

Blue




SMF spam blocked by CleanTalk