• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • 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.

[Script✓] What command was it to play music in battles?

Ace Trainer Slash

If you give me about two hours, I can make scripts
  • 236
    Posts
    6
    Years
    Hi. :)

    So, since I'm making a hack (for Fire Red), where most important trainers in the game intend to use the Champion's battle theme, I'm not sure what command, nor where to put it within a script. I can create a simple trainer battle script, but I'm unsure what command it is to play that specific theme during a trainer battle, nor where I should put that command in the script to actually function.

    Any help is greatly appreciated. :)
     
    Last edited:
    So this should play a song before you start the trainerbattle. Make sure to read XSE's scripting commands to see how playsong works.
    Code:
    special 0x03B
    playsong
    trainerbattle

    Ok, so I executed the script, specifically like this:
    special 0x03B
    playsong 0x12B 0x0
    trainerbattle etc...

    And the result was my trainer crashing the game, and turning the screen red, what was it that I did incorrectly?
     
    If you've attached the script to a trainer with a view radius, the game will crash; the only battles you can give battles custom music via scripting are ones that are activated by talking to an NPC or by stepping on a green script tile. This is because a trainer with a view radius must have trainerbattle as the first command in the script.

    If in your case the script isn't attached to a trainer with a view radius then ¯\_(ツ)_/¯
     
    If you've attached the script to a trainer with a view radius, the game will crash; the only battles you can give battles custom music via scripting are ones that are activated by talking to an NPC or by stepping on a green script tile. This is because a trainer with a view radius must have trainerbattle as the first command in the script.

    If in your case the script isn't attached to a trainer with a view radius then ¯\_(ツ)_/¯

    Ah, ok, well that's ok I guess, I wanted to give Youngster Joey his own Champion battle theme to be somewhat funny, but normal trainer battle fits too. I've got some stationary trainers in my hack that will utilise this information perfectly. :) Thanks for the help!, and to Petuuuhhh too! :)
     
    Firstly - Welcome back!

    Secondly - I think this might be what you're looking for
     
    Back
    Top