Hey everyone, you all have been extremely helpful as I put everything together, but I have one more issue I was hoping you might help with.
My game has a mechanic where as you complete certain passages, different layers of background music fade in. Some of these require fairly precise timing, and I've encountered an issue where occasionally the loop would start slightly late and the beat of the music would not line up, causing the music to sound sort of messy and incorrect.
I'm achieving the effect by having all of the loops started at the top of the game, just with the audio silenced like:
<<audio "Drums" play loop volume 0>>
And then when the player completes a section, the music fades in:
<<audio "Drums" fadeoverto 5 0.75>>
However this is setup is fairly finicky and will occasionally not work as intended. Within the Twine program itself, I was able to solve the issue with the <<waitforaudio>> macro, but whenever I export as an .html file or upload the game to a host online, the timing problem returns.
Any ideas on how I might be able to get this to work?
Currently using Twine Version 2.2.1 and Sugarcube 2.21.0.
Really appreciate you guys' fantastic insight as I figure all this out. Thank you!