Background music/Youtube music
Yuri
15 Mar 2013, 10:52Hello, I want to create a game book with background music.
I know it is possible to add music to a single page, but when the user leaves the page the music ends (and starts over again).
I thought there may be an option in the "functions" to add background music which plays over a while even if the reader is clicking on different pages.
And then I wanted to ask if there is any option to play youtube videos without showing them (like music).
Thanks, and I love the tool.
I hope I can create something great out of it
I know it is possible to add music to a single page, but when the user leaves the page the music ends (and starts over again).
I thought there may be an option in the "functions" to add background music which plays over a while even if the reader is clicking on different pages.
And then I wanted to ask if there is any option to play youtube videos without showing them (like music).
Thanks, and I love the tool.
I hope I can create something great out of it

HammerSpace
15 Mar 2013, 12:24Yeah! I was wondering why the music was limited to one page. It'd be nice to be able to create a background atmosphere, you know?
Alex
15 Mar 2013, 12:51In Quest 5.4 (available for download in beta, and it's the current web version if you use Quest in a browser), you could run a script to play a sound. This should keep playing as you navigate between pages - though I've not tested this so let me know if it doesn't work!
TriangleGames
15 Mar 2013, 13:25Actually, I was just playing around with that, and I couldn't get it to work that way either.
<!--Saved by Quest 5.4.4812.28144-->
<asl version="540">
<include ref="GamebookCore.aslx" />
<game name="GameBook01">
<gameid>a69b5b51-28ae-40cb-87f3-0ad18b8a695a</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
</game>
//FIRST PAGE STARTS HERE
<object name="First page">
<inherit name="script" />
<description><![CDATA[This is page 1. Type a description here, and then create links to other pages below.<br/>]]></description>
///SCRIPTS ARE HERE
<script type="script">
play sound ("Kalimba.mp3", false, false)
msg ("This is the first page.")
msg ("{page:Page2}")
msg ("{page:Page3}")
</script>
<object name="player">
<inherit name="defaultplayer" />
</object>
</object>
<object name="Page2">
<description>This is page 2. Type a description here, and then create links to other pages below.</description>
<options type="stringdictionary">
<item>
<key>Page3</key>
<value>Go To Page 3</value>
</item>
<item>
<key>First page</key>
<value>Page1</value>
</item>
</options>
</object>
<object name="Page3">
<description>This is page 3. Type a description here, and then create links to other pages below.</description>
<options type="stringdictionary">
<item>
<key>Page2</key>
<value>Go To Page 2</value>
</item>
<item>
<key>First page</key>
<value>Page1</value>
</item>
</options>
</object>
</asl>
Yuri
15 Mar 2013, 16:23Hm, yeah, I've tried it with a script but I must be doing something wrong.
I did go to "Functions" -> "Add"
There put "Return Type" - None and no parameters.
Then I added a script which plays a song.
What did I make wrong?
EDIT: I am new to this whole thing, I am sorry for asking something stupid.
I did go to "Functions" -> "Add"
There put "Return Type" - None and no parameters.
Then I added a script which plays a song.
What did I make wrong?
EDIT: I am new to this whole thing, I am sorry for asking something stupid.
sonic102
15 Mar 2013, 20:58Did you call that function? (Functions only work when you call them, like dogs)
In the Scripts tab, click "Call function" and type the name of your function. Or instead of that, go to the first tab and type "Play a sound". It works in TA, so GB should work.
In the Scripts tab, click "Call function" and type the name of your function. Or instead of that, go to the first tab and type "Play a sound". It works in TA, so GB should work.
Yuri
15 Mar 2013, 22:31Sorry for being dumb... but where can I call a script in the book game? How can I call a script?
There's only a "page" and "action" tab and the action tab only contains the option to upload music; but the music will stop as soon as you move to a new page :/
EDIT: I got it. I have to use scripts as pages, now it works when I call the function.
But now there's another problem; how can I now redirect to other pages? I don't find that option.
There's only a "page" and "action" tab and the action tab only contains the option to upload music; but the music will stop as soon as you move to a new page :/
EDIT: I got it. I have to use scripts as pages, now it works when I call the function.
But now there's another problem; how can I now redirect to other pages? I don't find that option.
Yuri
16 Mar 2013, 14:11Yuri wrote:
EDIT: I got it. I have to use scripts as pages, now it works when I call the function.
But now there's another problem; how can I now redirect to other pages? I don't find that option.
Anyone?
Why can I only show text + links to other pages OR run a script; why not both at the same page?

sgreig
16 Mar 2013, 16:57Yuri wrote:"Yuri"
EDIT: I got it. I have to use scripts as pages, now it works when I call the function.
But now there's another problem; how can I now redirect to other pages? I don't find that option.
Anyone?
Why can I only show text + links to other pages OR run a script; why not both at the same page?
You probably just need to create the links to other pages in the script.
TriangleGames
16 Mar 2013, 17:04This page in the wiki discusses some things that should help.
Yuri
17 Mar 2013, 11:55Thanks; everythings working fine.
But the music still starts over again when calling a function :/
How can I make the music keep playing while entering a new page?
But the music still starts over again when calling a function :/
How can I make the music keep playing while entering a new page?