Fixing Ninja Bomberman's music stopping?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

Squeaksol
Koopa
Koopa
Posts: 18
Joined: Fri Jan 04, 2019 1:45 am
Flair: I still don't know what a flair is
Pronouns: he/him

Fixing Ninja Bomberman's music stopping?

Postby Squeaksol » Mon Jan 10, 2022 3:30 am

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

deice
Rocky Wrench
Rocky Wrench
Posts: 638
Joined: Fri Jul 23, 2021 7:35 am

Re: Fixing Ninja Bomberman's music stopping?

Postby deice » 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

Squeaksol
Koopa
Koopa
Posts: 18
Joined: Fri Jan 04, 2019 1:45 am
Flair: I still don't know what a flair is
Pronouns: he/him

Re: Fixing Ninja Bomberman's music stopping?

Postby Squeaksol » Tue Jan 11, 2022 7:46 am

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!


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 5 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari