Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

Music function

A topic by ATSxp created Aug 04, 2021 Views: 130 Replies: 2
Viewing posts 1 to 2

Hi. I would like to know why the "music" function doesn't work within the TIC  function.

Developer(+2)

Hi,

because you trigger the music() function every TIC() and music starts playing every frame from the beginning.

Please add something like 

music_started=false
function TIC()
    if not music_started then        
        music(0)
        music_started=true
    end
end

ok, thanks