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.

[REQ]RTAB Add-On, Victory Speech

I'd like to request a script that I'd like to call "Victory Speech". It would go something like this.
Once the last enemy is killed, it uses that Hero ID to trigger a certain sound effect (in my case, a voice clip). This sound plays once the Victory ME plays.
If I'm not specific enough, please tell me.
Thanks in advance to the person who would accept this request.
 
Try adding this above "Main":

Code:
class Scene_Battle
  alias daniel_start_phase5 start_phase5
  def start_phase5
    case @active_battler.id
    when 1
      Audio.se_play("Audio/SE/[color=red]filename[/color]")
    when 2
      Audio.se_play("Audio/SE/[color=red]filename[/color]")
    when 3
      Audio.se_play("Audio/SE/[color=red]filename[/color]")
    when 4
      Audio.se_play("Audio/SE/[color=red]filename[/color]")
    when 5
      Audio.se_play("Audio/SE/[color=red]filename[/color]")
    when 6
      Audio.se_play("Audio/SE/[color=red]filename[/color]")
    end
    daniel_start_phase5
  end
end

Replace filename with the filename of the sound effect. Add more "whens" if you want a sound effect for actor number 7, 8, etc.
It isn't tested, so tell me if it doesn't work.
 
Maybe it's the program you used to MAKE the wav file. Sometimes my wavs get pretty messed up because I made them with a specific program. Just load them up in an other wav program and "Save As". That should do the trick for midi-echoes as well. I'm not sure what's wrong, as it works fine for me.
 

Clive

Member

I had the same problem, what I did is to put no sound effect for the monsters when they died and it plays without any problem.
Now I'm wondering if it is possible to make the sound effect random depending on the characters you have in the team.
For example you have actor 1,2,3 and when the team win, you can hear one of the three voices.
 
Oh, that's easy.

Code:
class Scene_Battle
  alias daniel_start_phase5 start_phase5
  def start_phase5
   if game_variables[1] == 1
    case rand(4) #@active_battler.id
    when 0
      Audio.se_play("Audio/SE/filename")
    when 1
      Audio.se_play("Audio/SE/filename")
    when 2
      Audio.se_play("Audio/SE/filename")
    when 3
      Audio.se_play("Audio/SE/filename")
    end
   elsif game_variables[1] == 2
    case rand(3) #@active_battler.id
    when 0
      Audio.se_play("Audio/SE/filename")
    when 1
      Audio.se_play("Audio/SE/filename")
    when 2
      Audio.se_play("Audio/SE/filename")
    end
    daniel_start_phase5
  end
end

Then change the game variable 1 each time the party changes. Not very effective, but it works. And unless you get some expert's help like Trickster, it will do. ^^
 

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