Page 1 of 1

Fixing Ninja Bomberman's music stopping?

Posted: Mon Jan 10, 2022 3:30 am
by Squeaksol
Hopefully this is the right topic for this, I'm not completely sure where everything goes yet

Dying as Ninja Bomberman makes all music in a level stop until you exit and re-enter. I noticed that this doesn't happen in his demo stage, but I haven't worked out exactly how, other than I think this is done through some specific lua? If someone could help me work out what I could do for this to not happen that would be very helpful

Re: Fixing Ninja Bomberman's music stopping?

Posted: Mon Jan 10, 2022 7:51 am
by deice
it seems that the demo stage fixes the problem using the following lines of code in onTick():

Code: Select all

if (Audio.MusicIsPlaying() == false and not isWinning) then
	Audio.MusicOpen("The Heist.ogg")
	Audio.MusicPlay()
end
in order to make sure the music still properly cuts out at the end, this is done in onEvent() when the event named "end" is triggered:

Code: Select all

if(calledEvent == "end") then
	Audio.MusicStop()
	isWinning = true
end

Re: Fixing Ninja Bomberman's music stopping?

Posted: Tue Jan 11, 2022 7:46 am
by Squeaksol
deice wrote:
Mon Jan 10, 2022 7:51 am
it seems that the demo stage fixes the problem using the following lines of code in onTick():

Code: Select all

if (Audio.MusicIsPlaying() == false and not isWinning) then
	Audio.MusicOpen("The Heist.ogg")
	Audio.MusicPlay()
end
in order to make sure the music still properly cuts out at the end, this is done in onEvent() when the event named "end" is triggered:

Code: Select all

if(calledEvent == "end") then
	Audio.MusicStop()
	isWinning = true
end
That seems to work, thank you!