• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other Question] how to add SFX to battle HUD? Essentials 18.1

  • 55
    Posts
    6
    Years
    • Seen Mar 22, 2025
    is there any way to add sound effects to the battle HUD as it loads in? like, the "ding"s of the pokeballs sliding into place and the "whoosh" of the line sliding in?
     
    is there any way to add sound effects to the battle HUD as it loads in? like, the "ding"s of the pokeballs sliding into place and the "whoosh" of the line sliding in?

    Basically you want the function:
    Code:
    def pbSEPlay(param,volume=nil,pitch=nil)
    which plays a sound effect (an MP3 / WAV file that is in the Audio/SE folder).

    The ball sliding animation is in class:
    Code:
    class LineupAppearAnimation
    in particular you'll want to check out the function:
    Code:
      def createBall(idxBall,delay,dir)
    and add the pbSEPlay call in it.

    Hope that helps!

    EDIT: also, you'll need to find the sound effects yourself. What I do is look for Youtube videos with the sound I want, use a Youtube-to-MP3 converter, and extract what I want with Audacity.
     
    Last edited:
    def createBall(idxBall,delay,dir)
    # Choose ball's graphic
    idxParty = getPartyIndexFromBallIndex(idxBall)
    graphicFilename = "Graphics/Pictures/Battle/icon_ball_empty"
    if idxParty>=0 && idxParty<@party.length && @party[idxParty]
    if !@party[idxParty].able?
    graphicFilename = "Graphics/Pictures/Battle/icon_ball_faint"
    elsif @party[idxParty].status!=PBStatuses::NONE
    graphicFilename = "Graphics/Pictures/Battle/icon_ball_status"
    else
    graphicFilename = "Graphics/Pictures/Battle/icon_ball"
    end
    end
    # Set up ball sprite
    ball = addSprite(@sprites["partyBall_#{@side}_#{idxBall}"])
    ball.setVisible(delay,true)
    ball.setName(delay,graphicFilename)
    ball.setDelta(delay,dir*Graphics.width/2,0)
    ball.moveDelta(delay,8,-dir*Graphics.width/2,0)
    def pbSEPlay(Mining reveal.ogg,volume=100,pitch=100) <------------------------------ Here is the sound effect
    end
    end

    Sorry for super lateness, I kinda gave up for a bit since no one responded lol. It says syntax error when I boot up the game, why? I'll experiment, may end up solving it on my own. I'm using a mining sound effect for the dings btw

    Also, do you know where the line code is? I'd like to put a sound for that too
     
    Ok, I figured out that I needed to remove the Def, and i got it kinda working? But the sound only plays right at the beginning of the animation, instead of playing a ding when each pokeball slides into place. What can I do now?
     
    Back
    Top