- 5,256
- Posts
- 16
- Years
- Age 26
- Leicester, UK
- Seen today
Hey guys. Can someone help me get my script to work which starts a wild battle after defeating a trainer? I have this so far, but as of now, the game exits the script and only battles after I click on the same sprite again. I can't seem to identify what is wrong, and it shouldn't even be that difficult. Help?
Spoiler:
#dynamic 0x80BEBE
#org @start
trainerbattle 0x0 0x00F 0x0 @before @after
wildbattle 0x9F 0x19 0xD1
fadescreen 0x1
fadescreen 0x0
msgbox @beaten 0x6
fadescreen 0x0
//Hidesprites are so that you can only challenge one of the trainers
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
setflag 0x1212
release
end
#org @before
= Sorry, to break it to you, but I'm\nnot about to let you pass.\pUnless you think you can beat me?
#org @after
= Y-You... You're tough! TRUDLEY and\nFOLLY can't be blamed for losing!\pI guess I have to use my SHADOW\nPOKEMON!
#org @beaten
= You haven't seen the last of us!
You need to use trainerbattle 0x1
Code:
#dynamic 0x80BEBE
#org @start
trainerbattle 0x1 0x00F 0x1 @before @after @snippet1
#org @snippet1
wildbattle 0x9F 0x19 0xD1
fadescreen 0x1
fadescreen 0x0
msgbox @beaten 0x6
fadescreen 0x0
//Hidesprites are so that you can only challenge one of the trainers
hidesprite 0x7
hidesprite 0x8
hidesprite 0x9
setflag 0x1212
release
end
#org @before
= Sorry, to break it to you, but I'm\nnot about to let you pass.\pUnless you think you can beat me?
#org @after
= Y-You... You're tough! TRUDLEY and\nFOLLY can't be blamed for losing!\pI guess I have to use my SHADOW\nPOKEMON!
#org @beaten
= You haven't seen the last of us!
edit the flag you're using is unsafe. iirc, 0x200 to 0x400 are the only truly safe flags, definitely 0x200 to 0x2ff
Last edited: