You are not logged in.
Little recurring problem I am having here with adding new trainers into the overworld. The problem is similar to the one described and solved in this topic here : https://hax.iimarckus.org/topic/5656/
However, I am trying to add new trainers to Route 2, a map that didn't already have trainers on it originally. Even though my object data and script is seemingly fine, a virtual carbon copy of Route 3, the trainers do not behave correctly.
They will see you, the battle will initiate and work fine, however when you beat the trainer, the flag is not set saying that you have. This results in an endless battle loop that you can't excape from. I have added new event constants for these new trainers, is there something else that I'm missing?
There's also another strange glitch happening on this map, where an NPC gives you a Freshwater. The event plays out fine, but at the end, his sprite and those of all the others on the map glitch. Something's seriously wrong somewhere, but I can't work it out.
Any help, pointers or advice would be greatly appreciated if anyone has experienced this same problem. Cheers!
I think you might be looking for the event constants. That's a good place to start.
Thanks Fotomac, however I have added new event constants for every trainer. Unless there is somewhere else other than event_constants.asm that would need editing as well?
You would need to edit the corresponding script to add the events, if I remember correctly. It worked for me when I added a Lass into Pewter Gym as a reference to Pokémon Origins, but just in case I'd like to suggest setting each trainer's line of sight to 0, so talking to the trainer becomes mandatory to trigger a battle.
OK, so I figured out what was causing the sprite glitching in the game. Turns out that Route 2's sprite set is split into two, and all battles and events that were set below the boundary between the two different sprite sets for the map were behaving incorrectly. A simple change of the map's assigned sprite set to not have the split solved the problem straight away.
With regard to trainer flags not being set, it was a typo of one number on my part that caused the problem. Woops! :O Thanks for giving your ideas Fotomac!