• 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] Need help with finding where to put code to save overworld BGM position

  • 282
    Posts
    6
    Years
    • Seen Feb 3, 2025
    Hi, so I have been wanting to make it so the position of the music that is playing on an overworld map is saved when a battle starts and played starting from that position after the battle. This is a feature in (at least some of) the official games and I think it's good especially for tracks that take a while to get good (you often listen to the beginning of overworld tracks more than any other part and sometimes don't get very far into the song).

    This seems pretty simple, and I am trying to use a game variable for this that stores the BGM position each time a battle starts and then plays the overworld BGM from the position as saved in the variable. I'm pretty sure I have the storing of the position in a variable done correctly (though I'm not sure I put it in the best spot), but I can't seem to find where in the scripts the BGM is restored after battle. Does anyone know where this would be?

    I've already pasted "$game_variables[37]=$game_system.bgm_position" before each call to "pbPrepareBattle(battle)" which should theoretically save the position of the music playing before battle.
     
    Back
    Top