- 1
- Posts
- 2
- Years
- Seen Jan 18, 2023
Hi all, wondering if anyone can shed any light on how to correctly add a trainer battle into a map script in Pokered disassembly?
Essentially I have a trigger script that when the player steps on a certain XY coordinate, an NPC walks over, text appears and a trainer battle begins. I have studied the scripts in the standard game when this occurs, eg. Rival battle on Route 22, Cerulean City etc., but get a glitched Missingno wild battle when compiling.
Maps such as those described above that have scripted trainer battles do not have Trainer Headers, but rather write bytes to [wCurOpponent] and [wTrainerNo] and set bit 6 and 7 at [wd72d]. This appears to trigger a battle but maybe I'm missing something else?
Has anyone else run into this problem before and found a solution? Any help is much appreciated!
Cheers!
Essentially I have a trigger script that when the player steps on a certain XY coordinate, an NPC walks over, text appears and a trainer battle begins. I have studied the scripts in the standard game when this occurs, eg. Rival battle on Route 22, Cerulean City etc., but get a glitched Missingno wild battle when compiling.
Maps such as those described above that have scripted trainer battles do not have Trainer Headers, but rather write bytes to [wCurOpponent] and [wTrainerNo] and set bit 6 and 7 at [wd72d]. This appears to trigger a battle but maybe I'm missing something else?
Has anyone else run into this problem before and found a solution? Any help is much appreciated!
Cheers!