Help with Sound Looping/Continuing onto another page.

Alex_Dalliance
First post here! Just like to say thanks to Quest's creators and anyone replying to this, Quest really is fantastic.

So my first gamebook is finished except for properly integrating some music I composed for it.

I wrote a theme designed to play in the background of the entire game and loop, as the player wanders around inside of a maze, solving puzzles. I see it's easy to have a sound loop on one page or use the actions tab in the quest gamebook editor and play a sound and have it continue to play after the player moves to another page but I see no option to loop the sound. I'm using the windows version of Quest, up to date.

Is there anyway to code the song to loop indefinitely regardless of what page the player is on? Thank you in advance for your help.

jaynabonne
You can do it like this:

playsound.png

On your first page, set the type to "Script + Text". The you can add script to play the sound. Play the sound as usual (including looping), but then add the second line which sets "continuesound" on the game object to true. That will keep the sound from being stopped when you change pages.

In script, it looks like:


play sound ("bee.mp3", false, true)
game.continuesound = true

Alex_Dalliance
Thank you so much for your quick and detailed reply!

Works perfectly. I'm going to have a few friends play it to try and see if there's any bugs I missed, and I'll be publishing it soon. Thanks again!

Alex_Dalliance
Took me a bit to polish it off, but here's the link to the final game! Thanks again for your help!
http://textadventures.co.uk/games/view/ ... g/dysnomia

DropTheChair
How would you turn off the sound once you another enter a room? For example, you start that music in one room and then once you walk into the next room the music is turned off.

Let's say that in his game once you died you want the music to stop. How would you accomplish this?

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums