0 votes
by (660 points)
<<nobr>><<audio "mainmenumusic" play>><</nobr>><<nobr>><<first>><span class="mainmenu">&nbsp;[[Start->Passage 1]]</span><</first>><<first>><<finally>><span class="mainmenu">&nbsp;[[Start->Passage 2]]</span><</first>><</nobr>>
<<nobr>><<first>><span class="credits">&nbsp;==Credits==</span><</first>><<first>><<finally>><span class="mainmenu">&nbsp;[[Credits->Passage 3]]</span><</first>><</nobr>>

This is the code for the starting page of the game (I'm not sure how to make the rectangle bigger, sorry). When the game is launched, music plays normally, but when the player returns to this same page later, music doesn't play at all. Am I doing something wrong? I'm using Chapel's <<first>> macro, which works fine.

1 Answer

+1 vote
by (61.5k points)
selected by
 
Best answer

Maybe you faded it out somewhere? Try setting the volume in the <<audio>> call. 

<<audio "mainmenumusic" volume 1 play>>

I don't think you need so many <<first>> macros there either. Instead of switching back and forth, you can do: 

<<first>>First visit content and links.<<finally>>Second visit content and links.<</first>>

Also, if you're gonna use a <<nobr>> you can/should space out your code to make it more readable. 

by (660 points)

Maybe you faded it out somewhere? Try setting the volume in the <<audio>> call. 

<<audio "mainmenumusic" volume 1 play>>

It worked! Thanks so much.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...