How to loop and not clear music/sfx
Mr.Dot
02 May 2021, 00:06I'm adding music to my game now but adding: <audio blah blah blah>
every little section is annoying and the audio restarts everytime like for example:
<audio>
'hello'
[say hi back]:
<audio>
'hi'
will be a pain for me and the player.
K.V.
07 May 2021, 16:30You can try using Javascript to add an audio element to the document's body. Then, it won't be inside of the HTML element that gets cleared.