![]() |
Can't Rebattle Scripted Trainer
So in my hack I have a trainer where he will walk up to you and battle you when you step on the tile. If you beat him, he disappears and the roadblock I set up disappears as well which is what I want. However, if you lose to him, you can't rechallenge him and the roadblock can't move. How can I fix this?
|
Quote:
|
Quote:
|
'---------------
#org 0x80377D msgbox 0x88037F2 MSG_NORMAL '"Good. That makes two. Soon Jirachi..." msgbox 0x880383A MSG_NORMAL '"[blue_fr]I think someone is here." msgbox 0x8803876 MSG_NORMAL '"Seems we have a guest.\pTake care ..." applymovement 0x2 0x8803873 waitmovement 0x2 applymovement MOVE_PLAYER 0x88038A9 waitmovement 0xFF applymovement 0x2 0x88038AE waitmovement 0x2 applymovement 0x1 0x88038BA waitmovement 0x1 hidesprite 0x2 setvar 0x4046 0x4 setflag 0x1246 trainerbattle 0x2 0x8 0x0 0x88038C2 0x88038E2 0x88037DD release end '--------------- #org 0x8037DD msgbox 0x88038F7 MSG_NORMAL '"[blue_fr]Hm. I'll have to tell the..." fadescreen 0x1 setflag 0x1248 hidesprite 0x1 fadescreen 0x0 release end '--------- ' Strings '--------- #org 0x8037F2 = Good. That makes two. Soon Jirachi\nwill come straight to us. #org 0x80383A = [blue_fr]I think someone is here. #org 0x803876 = Seems we have a guest.\pTake care of that for me. #org 0x8038C2 = [blue_fr]Just following orders. #org 0x8038E2 = This is a problem. #org 0x8038F7 = [blue_fr]Hm. I'll have to tell the\nothers. '----------- ' Movements '----------- #org 0x803873 #raw 0x0 'Face Down #raw 0xFE 'End of Movements #org 0x8038A9 #raw 0x1D 'Step Down (Fast) #raw 0x1D 'Step Down (Fast) #raw 0x1F 'Step Left (Fast) #raw 0x3 'Face Right #raw 0xFE 'End of Movements #org 0x8038AE #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x13 'Step Right (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0xFE 'End of Movements #org 0x8038BA #raw 0x13 'Step Right (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x10 'Step Down (Normal) #raw 0x2 'Face Left #raw 0xFE 'End of Movements |
Quote:
|
I may have to rewrite it because it's giving me a too many parameters error when I change it to 0x9 but not if I leave it at 0x2. I'll rewrite it and try what you said. Would I be having it call the same flag as the script or a different flag to signal the blockade to disappear?
|
Quote:
|
I did rewrite it and it still doesn't let me rematch him but the roadblock does move and he does vanish if I lose. I'm half considering leaving this in and it just be a match that if you lose, you lose. I tried comparing it to something like Gary in Silph Co. or on SS Anne and I may just have to settle.
If you did do that for me though, that would be incredible and I would be so grateful. |
Quote:
|
Yes
|
Quote:
|
Quote:
Code:
Hope this clears things up! |
It definitely works! Thank you so much! Unfortunately the dialogue remains with the hidesprites still in effect but I can work around that to make it fit. You've definitely helped me with figuring it out for future scripts as well. Thanks again!
|
Quote:
|
So that would have the NPC I battle standing in the spot he walked to when I return?
|
Quote:
Like this: Code:
|
The dialogue still seems to plays out no matter what I try. I really do appreciate your help but you don't have to keep trying. I'll try and figure a way out to make it work.
|
Quote:
|
The dialogue that plays out before the battle
|
Quote:
EDIT: Oh, okay. You mean the dialogue screen remains there? |
Specifically, the script will play out like normal and then when I lose and go back, the script will replay itself when I step on the designated tile but the one that gets hidden first is still hidden upon going back and his dialogue plays like normal
|
I believe I have the non compiled script if that might help
|
Quote:
Code:
|
It definitely worked! He does remain in his starting position when you go back but I should be able to solve that with a movement script added to the dialogue.
|
Good news! It works perfectly now. Thank you so much for all your help and time and I will make sure to credit you when it's done in a few months!
|
| All times are GMT -8. The time now is 2:21 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.