• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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] Can't Rebattle Scripted Trainer

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
 
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

There is a way around this. But you can also make the script as though the other person is watching the battle. Or just:
Code:
#dynamic 0x(Your Offset)

#org @start
lock
checkflag 0x(WHATEVER YOU WANT)
if 0x1 goto @already
msgbox @msg1 0x2 
msgbox @msg2 0x2
msgbox @msg3 0x2
waitmsg 
applymovement 0x2 @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
applymovement 0x2 @move3
waitmovement 0x0
applymovement 0x1 @move4
waitmovement 0x0
hidesprite 0x2
setflag 0x(whatever Person ID the "0x2" person event has)
msgbox @ext 0x2
setflag 0x(WHATEVER YOU WANT, BUT SHOULD BE SAME AS THE ONE ABOVE IN "checkflag")
trainerbattle 0x3 0x8 0x0 @after
msgbox @msg5 0x2
fadescreen 0x1
setflag 0x1248
hidesprite 0x1
setflag 0x(whatever Person ID the "0x1" person event has)
fadescreen 0x0
setvar 0x4046 0x4
setflag 0x1246
release
end

#org @already
msgbox @ext2 0x2
trainerbattle 0x3 0x8 0x0 @after
msgbox @msg5 0x2
fadescreen 0x1
setflag 0x1248
hidesprite 0x1
setflag 0x(whatever Person ID the "0x1" person event has)
fadescreen 0x0
setvar 0x4046 0x4
setflag 0x1246
release
end

'---------
' Strings
'---------

#org @msg1
= Good. That makes two. Soon Jirachi\nwill come straight to us.

#org @msg2
= [blue_fr]I think someone is here.

#org @msg3
= Seems we have a guest.\pTake care of that for me.

#org @ext
= [blue_fr]Just following orders.

#org @ext2
= [blue_fr]Hunh? You came back?\nWhy you...

#org @after
= This is a problem.

#org @msg5
= [blue_fr]Hm. I'll have to tell the\nothers.

'-----------
' Movements
'-----------

#org @move1
#raw 0x0 'Face Down
#raw 0xFE 'End of Movements

#org @move2
#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 @move3
#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 @move4
#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
 
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!
 
Back
Top