The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Reappearing pokemon event?

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 March 16th, 2017 (2:51 PM).
ChaosSigma0's Avatar
ChaosSigma0 ChaosSigma0 is offline
How do I change this stupid username?
 
Join Date: May 2014
Location: Jamaica
Age: 29
Gender: Male
Nature: Quiet
Posts: 16
(I hope this is in the right place...) Greetings, fellow humans.
I've been working on a romhack of my own, on and off, for a few months now. And now I've got to a point where I'm stuck...

I'm using Advance Map and PKSVUI. Here's the code:

Spoiler:
Code:
#org 0x87410EF
'-----------------------------------
lock
faceplayer
cry MEW 0x0
waitcry
pause 0x14
battle MEW 10 LUMBERRY
lastbattle
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
setflag 0x1110
msgbox 0x87CEE1A ' The Mew flew away[.]...
callstd MSG_LOCK ' Built-in lock command
copyvarifnotzero 0x8000 FLUFFYTAIL
copyvarifnotzero 0x8001 0x1
callstd MSG_FIND ' PLAYER found one XXXXXX!
release
end


#org 0x87CEE1A
= The Mew flew away[.]\lHuh? It dropped something[.]


When the battle is complete, the screen is supposed to fade to black and back with the pokemon gone, some text, and an item 'dropped'. But as soon as I take another step, it appears again in the same spot! Interacting with it again repeats the whole thing over again.

I just don't know what went wrong.

Please help, I'm not exactly well-versed in this scripting business as this is my first romhack. I'm good at designing maps, but scripting looks like a pain.
__________________
One step forward, two steps back...

Currently working on:
something...
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 16th, 2017 (4:47 PM).
Pinta87's Avatar
Pinta87 Pinta87 is offline
 
Join Date: Mar 2017
Posts: 56
Did you have it set a flag, and then give the npc the flag in AM?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old March 16th, 2017 (6:05 PM).
longlostsoldier's Avatar
longlostsoldier longlostsoldier is offline
 
Join Date: Oct 2013
Gender: Other
Nature: Quiet
Posts: 200
I don't remember the right flag range off the top of my head, but it's possible you didn't use a safe flag. I don't recall ever using 1000+ flag range, I'd double check that those are safe. Most safe flags are between 200-400 I think, the ones Nintendo usually uses.

Or what the other person said, you didn't give your NPC a character id that matches your flag.
__________________
Evo-Yellow: 151 Evolve Raichu Hack, uses the Yellow Disassembly. Play as girl, ride a pokemon, special/physical, dark/fairy/steel types, new pokemon, gen 2 sprites, evolve Pikachu into Raichu and have them still follow you with new Raichu emotion sprites!
Yellow Hack Tutorial
Fire Yellow - A FireRed Hack & Yellow Remake with Following Pikachu - I am not continuing this until I get a new computer where I can use the latest disassembly. My old one can only run gen I disassemblies.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old March 17th, 2017 (12:50 AM).
DizzyEgg's Avatar
DizzyEgg DizzyEgg is offline
 
Join Date: Feb 2014
Location: Poland
Age: 25
Gender: Male
Nature: Quiet
Posts: 794
Flags above 0x1000 actually point to vars.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old March 17th, 2017 (6:50 AM).
mbcn10ww mbcn10ww is offline
 
Join Date: Oct 2016
Posts: 352
Quote:
Originally Posted by ChaosSigma0 View Post
(I hope this is in the right place...) Greetings, fellow humans.
I've been working on a romhack of my own, on and off, for a few months now. And now I've got to a point where I'm stuck...

I'm using Advance Map and PKSVUI. Here's the code:

Spoiler:
Code:
#org 0x87410EF
'-----------------------------------
lock
faceplayer
cry MEW 0x0
waitcry
pause 0x14
battle MEW 10 LUMBERRY
lastbattle
fadescreen FADEOUT_BLACK
disappear LASTTALKED
fadescreen FADEIN_BLACK
setflag 0x1110
msgbox 0x87CEE1A ' The Mew flew away[.]...
callstd MSG_LOCK ' Built-in lock command
copyvarifnotzero 0x8000 FLUFFYTAIL
copyvarifnotzero 0x8001 0x1
callstd MSG_FIND ' PLAYER found one XXXXXX!
release
end


#org 0x87CEE1A
= The Mew flew away[.]\lHuh? It dropped something[.]


When the battle is complete, the screen is supposed to fade to black and back with the pokemon gone, some text, and an item 'dropped'. But as soon as I take another step, it appears again in the same spot! Interacting with it again repeats the whole thing over again.

I just don't know what went wrong.

Please help, I'm not exactly well-versed in this scripting business as this is my first romhack. I'm good at designing maps, but scripting looks like a pain.
You need to set a flag at the end of your script, then place the same flag at Person ID in A-Map.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old March 17th, 2017 (10:37 AM).
Pinta87's Avatar
Pinta87 Pinta87 is offline
 
Join Date: Mar 2017
Posts: 56
I always use 0x1200 and up
__________________
..
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old March 17th, 2017 (11:27 AM).
ChaosSigma0's Avatar
ChaosSigma0 ChaosSigma0 is offline
How do I change this stupid username?
 
Join Date: May 2014
Location: Jamaica
Age: 29
Gender: Male
Nature: Quiet
Posts: 16
Thanks for the info, you guys! ^^

I did forget to set the ID for the event sprite in Advance Map. And just so I don't accidentally screw something else up later on, I'm using a flag reference list I just found here.

And I'll take longlostsoldier's word for it, and use the flags around 0x200.
__________________
One step forward, two steps back...

Currently working on:
something...
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old March 18th, 2017 (4:49 AM).
Pinta87's Avatar
Pinta87 Pinta87 is offline
 
Join Date: Mar 2017
Posts: 56
I'll have to take a look at that list. I'm a little rusty
__________________
..
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:17 AM.