• 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!
  • 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.

[Scripting Question] Can someone help me with a script?

  • 68
    Posts
    6
    Years
    • Seen Sep 19, 2023
    So I'm making an intro in the beginning of the game, but it has no music, but I wouldn't know how to make it play music. I'm not really good at scripting, so I would need someone's help. Just ask if you need me to give you the code for it to be put in. Thanks a lot!
     
    So I'm making an intro in the beginning of the game, but it has no music, but I wouldn't know how to make it play music. I'm not really good at scripting, so I would need someone's help. Just ask if you need me to give you the code for it to be put in. Thanks a lot!

    Playing music is demonstrated in the Default Essentials Oak Intro, check it out.
     
    The thing is, it's a script for a FRLG intro with Nidoran and Gengar and the script doesn't have music, it's not an event. I wish it was so it was that easy, but it's not. Whenever I load up the game, it plays but with no music cuz' the script or didn't add any.
     
    The thing is, it's a script for a FRLG intro with Nidoran and Gengar and the script doesn't have music, it's not an event. I wish it was so it was that easy, but it's not. Whenever I load up the game, it plays but with no music cuz' the script or didn't add any.

    I think you should be able to add pbPlayBGM("BGM") to the main function and the music will play.
     
    It was close, but it's still getting errors. Here's the script if you wanna see it.
    Spoiler:

    That's the first bit of code, it might not even be where I'm supposed to put it, but this is the second script.
    Spoiler:
     
    It was close, but it's still getting errors. Here's the script if you wanna see it.
    Spoiler:

    No by main function, I meant this.

    Code:
      def main
        pbPlayBGM("01 Gamefreak Logo")
        loop do
          Graphics.update
          Input.update
          @anim.update if [email protected]?
          break if @anim.disposed?
          if Input.trigger?(Input::C)
            blk = Sprite.new(@viewport)
            blk.bitmap = Bitmap.new(480, 320)
            blk.bitmap.fill_rect(0, 0, 480, 320, Color.new(0, 0, 0))
            blk.z = 999999
            blk.opacity = 0
            for i in 0...16
              Graphics.update
              Input.update
              @anim.update if [email protected]?
              blk.opacity += 16
            end
            @anim.dispose
            blk.dispose
            break
          end
        end
      end

    I really don't know how Marins Intro Script works. You're better off asking him personally. I'm just taking a shot in the dark.
     
    I added the music to that specific intro on my game

    Name the song on your BGM file "FIntro"

    And, of course, give credits to the author, Marin.

    Spoiler:
     
    Thanks so much SuzuiXii. It helped, but because the Gamefreak Twinkle intro and the song for the Nidoran and Gengar battling are split in two, it only plays the one on a loop. Also, the Gamefreak Logo intro starts too fast and end before the scene does, so I might need a new BGM altogether. Is there a way I can merge them together, or you can just give me your copy?
     
    Back
    Top