The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script How do I make a wild battle script whose sprite only appears after becoming champion?

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old September 24th, 2020 (12:23 PM).
angelkof angelkof is offline
 
Join Date: Aug 2020
Posts: 21
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?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old October 17th, 2020 (1:48 PM).
mcferaligatr's Avatar
mcferaligatr mcferaligatr is offline
 
Join Date: Nov 2018
Posts: 120
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

---------------------------------------------
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:16 AM.