Author Topic: Ambient sound  (Read 330 times)  Share 

Bartimaeus

  • When in doubt...Throw it at Rhys.
Ambient sound
« on: 28 Sep 2004, 21:50 »
The other day I figured out how to use this ambient sound thing to make a sound play in the background. However...
Whenever it changes rooms, the sound obviously has to start over again. As you can imagine, this sounds pretty weird on the game.
So, I searched the manual and I found this helpful titbit:
game.ambient_sounds_persist
According to the manual, if I set this to (1), the sound should play through the rooms. The only problem is that I don't know where to type all of this in.
In the global script?
I don't have a clue.
I'd really appreciate some help.
Thanks.
~The more adventures I go on, the more sand I get in my shoes

BorisZ

  • In the land of blind the one eyed man is king.
    • I can help with AGS tutoring
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with web design
    •  
Re: Ambient sound
« Reply #1 on: 28 Sep 2004, 22:28 »
Try game_start in global script. ;D

Bartimaeus

  • When in doubt...Throw it at Rhys.
Re: Ambient sound
« Reply #2 on: 29 Sep 2004, 15:19 »
Yep... I found it in global script, but now what should I do?
I tried typing the game.ambient_sound_persist thing before, after, in between, you name it. It still won't work.
Am I missing something here?
~The more adventures I go on, the more sand I get in my shoes

Ashen

Re: Ambient sound
« Reply #3 on: 29 Sep 2004, 15:27 »
Try this:
[code]
#sectionstart game_start  // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
  // called when the game starts, before the first room is loaded
  game.ambient_sounds_persist = 1;
}
#sectionend game_start  // DO NOT EDIT OR REMOVE THIS LINE
[/code]
(Obviously, if there's anything already in game_start, leave it there)
I know what you're thinking ... Don't think that.

Bartimaeus

  • When in doubt...Throw it at Rhys.
Re: Ambient sound
« Reply #4 on: 29 Sep 2004, 16:58 »
Eurika! She works!!!
Thanks alot. I was trying to put the '1' in brackets as opposed to '=1'.
Thanks for the help.
~The more adventures I go on, the more sand I get in my shoes

TerranRich

  • The Mystery Begins WHENEVER, Okay? ;)
    • I can help with characters
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
  • TerranRich worked on a game that was nominated for an AGS Award!
Re: Ambient sound
« Reply #5 on: 30 Sep 2004, 05:22 »
Nope, it's a global variable, not a function/command. :) Glad it works.