Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] How to stop victory theme *using an MP3 file*

Cyahn

Member

Hello, I'm having a problem with RPG maker XP. Every time the victory theme plays, it continues even after the battle finishes and if I get into another random battle while theme is still playing it overlaps the battle theme. Can anyone help me with this issue? thanks
 
The victory theme, or "Battle End ME" was intended to be short.
MEs (Musical Effects) are short sound files that play over the top of background music & sounds. Therefor, they don't get "stopped"

My recommendation is to shorted the mp3 file, so it ends naturally.
 

Atoa

Member

Use this mini-script
paste it above main, and bellow any battle system script:

Code:
 

class Scene_Battle

  alias battle_end_stop_me battle_end

  def battle_end(result)

    battle_end_stop_me(result)

    Audio.me_stop

  end

end
 
Atoa, you got VX?

Sniper, it looks like it should work in VX. Make sure you test it with a losing battle (GameOver) as well.
If the ME keeps playing too long, try stopping the ME first.

Code:
 

class Scene_Battle

  alias battle_end_stop_me battle_end

  def battle_end(result)

    Audio.me_stop

    battle_end_stop_me(result)

  end

end
 
The mini script works fine in VX :) although I had two problems with applying it.
1. The first time I got all the test preperations ready and then forget to put the script in XD
2. I had left the numbers on the side which cause an unfriendly syntax error.

I tested game over as well and it worked, now sorry to pester, but is there a way to make the ME fade out as opposed to just cutting out?
 
Atoa; is that in response to fading out? I applied it and it seemed smoother but I'm not sure if it was fading out per se. EDIT: Nevermind, I applied music to the area and it all fades just fine.

Off-topic: I take it from your avatar, you're a Persona 2:Tsumi/Innocent Sin fan?
 

Cyahn

Member

Atoa":316a932k said:
Use this mini-script
paste it above main, and bellow any battle system script:

Code:
 

class Scene_Battle

  alias battle_end_stop_me battle_end

  def battle_end(result)

    battle_end_stop_me(result)

    Audio.me_stop

  end

end

Atoa you are amazing this seemed to fix the problem. :biggrin:
 
Atoa":2c9kdkuq said:
Use this mini-script
paste it above main, and bellow any battle system script:

Code:
  

class Scene_Battle

   alias battle_end_stop_me battle_end

   def battle_end(result)

      battle_end_stop_me(result)

      Audio.me_stop

   end

end


Pardon me if this sounds retarded. But, which parts do I exactly paste where? You said some of it above main and some below?
 
One last foolish question. In "audio.me_stop", Does "audio" mean whatever your battle victory me file is named? Also does anyone know if this script is affected by the SDK script?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top