• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
5
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:

    Ace Trainer Slash

    If you give me about two hours, I can make scripts
    236
    Posts
    5
    Years
  • 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?
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • 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 ¯\_(ツ)_/¯
     

    Ace Trainer Slash

    If you give me about two hours, I can make scripts
    236
    Posts
    5
    Years
  • 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! :)
     
    Back
    Top