The trainer sprite always goes out of bounds whenever the battle is finished. Are there any solutions to this?
Yep! Just go to Plugins\Elite Battle DX\[000] Scripts\Battle Modifiers\Scripted Battles, then:
comment out/delete this line in pbShowOpponent and pbHideOpponent:
moveEntireScene(x, (speech ? +2 : -1), true, true) if i%k > 0 || k == 1
the copy and paste this over the bottom of pbShowOpponent (
bold underlines are all I changed)
for i in 0...20.delta_add
k = 20.delta_add/20.0
#moveEntireScene(x, (speech ? +2 : -1), true, true) if i%k > 0 || k == 1
@sprites["opponent"].opacity += 12.8.delta_sub(false)
@sprites["opponent"].x +=
x/20 if i%k > 0 || k == 1
endx = @sprites["opponent"].x
@sprites["opponent"].y +=
0 if i%k > 0 || k == 1
endy = @sprites["opponent"].y
@sprites["box1"].zoom_x += (@viewport.width/16).delta_sub(false) if speech
@sprites["box2"].zoom_x += (@viewport.width/16).delta_sub(false) if speech
self.wait(1, true)
end
@sprites["opponent"].x =
endx
@sprites["opponent"].y =
endy # + (speech ? 2 : -1)
@sprites["box1"].zoom_x = @viewport.width if speech
@sprites["box2"].zoom_x = @viewport.width if speech
It's not perfect but looks way better. I did this with ESBX ported to v21.1 but if you're on a different version, just find pbShowOpponent and pbHideOpponent; the solution should be similar. Hope this helps!