Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Adrian on Mon 08/11/2010 16:50:00

Title: x and y coordinates gone with PlayAmbientSound?
Post by: Adrian on Mon 08/11/2010 16:50:00
Hi everyone,

sorry for bothering with this, but it's just a short simple question:

With the new audio system of AGS the PlayAmbientSound command is gone. Is there any substitute for the coordinates to be set within that command, which set the point where the ambient sound's volume is at maximum, depending on where the player character is?

I've searched the forums but found nothing like that.

Thanks!
Title: Re: x and y coordinates gone with PlayAmbientSound?
Post by: barefoot on Mon 08/11/2010 17:19:38
Hi

EG:
PlayAmbientSound(1, 10, 150, 250, 110);

this gives you the x and y as per question..

I Suppose you could have a couple of regions that you can repeat using higher/lower volume.  EG volume is set to 150.

Check it out in the manual..

Hope this helps?

barefoot

Title: Re: x and y coordinates gone with PlayAmbientSound?
Post by: Khris on Mon 08/11/2010 19:25:44
This is not yet in the online manual, so here's the example code from the helpfile:

  AudioChannel *channel = aMachine.Play();
  channel.SetRoomLocation(oMachine.X, oMachine.Y);
Title: Re: x and y coordinates gone with PlayAmbientSound?
Post by: Adrian on Tue 09/11/2010 16:55:03
barefoot, yes, I thought of managing it with some regions to alter the volume. That would have been my second choice  ;)
Khris, thanks a lot! That's exactely what I was looking for!