0 votes
by (790 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 (63.1k 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 (790 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.

...