• 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] How do I make a wild battle script whose sprite only appears after becoming champion?

21
Posts
3
Years
    • Seen Dec 29, 2020
    I want to make Jirachi available in my rom hack of Pokemon Emerald after you become champion and I want to make it appear in a city; however, idk how to hide the sprite so you can only see it after beating the league. Can someone help me with the script?
     
    120
    Posts
    5
    Years
    • Seen Nov 2, 2023
    Lets say that after beating a champion, you set a flag (I'll use flag 0x210 for this example).

    --------------------------------------------------------------
    Tutorial for the script event of the wild battle:

    The wild battle script won't be activated unless the champion has been defeated (flag 0x210 has been set), so, to do that you will have to:

    - For the script event to not activate, use a level script that will set the variable value to 0x1 preferably in the city where the wild battle will initiate
    (I'll use variable 0x4011) for this example but, make sure that the variable value in Advance Map is 0x0 (meaning that the event will only activate when variable 0x4011 stores the value 0x0).

    -in the same level script I mentioned before, add a command that will check for flag 0x210, and if it is set, go to the part of code where you'll set the variable value to 0x0 so that the script event of the wild battle can activate.

    -------------------------------------------------------------
    If you want the Jirachi to be a person event where you can interact with it, here's what you will do:

    -Give Jirachi a flag number (person ID in Advance Map) (Let's use flag 0x211 as it's person ID)

    -Use a level script that will check for flag 0x210 and if it is not set, use command hidesprite and setflag (hidesprite needs person event number, and setflag needs the number of Jirachi's flag), and if the flag is set, go to the part of code where you'll use showsprite and clearflag (showsprite needs person event number and setflag Jirachi's flag number)

    Level scripts for hidesprite/showsprite are type 3 level scripts.

    ------------------------------------------
    Here is a little example (for the Jirachi person event)

    #dynamic 0x800000
    #org @start
    checkflag 0x210
    if 0x1 goto @ChampionDefeated
    hidesprite 0x1 '----------------- (Here I used 0x1, but you have to put the person event number of Jirachi here)
    setflag 0x211
    end

    #org @ChampionDefeated
    showsprite 0x1
    clearflag 0x211
    end

    ---------------------------------------------
     
    Back
    Top