how to keep track of event locations so they stay in place instead of reset default locations

im making a game which has rats randomly strolling around and if you were to step on one it would kill it the problem im having is when you kill a rat the location its killed at resets to its default start location when a map transfer is executed so im asking for help on how to resolve this issue i appreciate your time
I'm reasonably certain you'll need a plugin for saving event locations.
Such as Yanfly's Save Event Location.
Alternately, as a potentially long workaround depending on how many rats you have, assign a switch to control an autorun event, and two variables to each rat for their X and Y coordinates.

Add an autorun event using that switch as a condition to the map somewhere it won't be in the way. Have it check each rat to see if its “death” condition has been met. (If you’re using self-switches on the rat for that purpose, you may need to change that to regular switches for this to work unless you don’t mind digging into the JavaScript to deal with that.) If that rat is dead, use Set Event Location… » Designation with variables to put it where it belongs according to its variables. At the end of the event after it’s checked every rat, turn the switch off.

Any player transfer events on that map that move the player to a different map will need the switch turned back on after the transfer command, resetting the autorun event so it can do its thing.
yeah ive kinda came to that conclusion the other night after several different variations lol by chance do you know where i can find a plug in like that? i appreciate your time
I'm reasonably certain you'll need a plugin for saving event locations
Such as Yanfly's Save Event Location.
are there any others you know of that is similar because im not really trying to use any Yanfly plug ins
...why? It's free. You can try to Google it, see if anyone else also made one.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-keep-track-of-event-locations-so-they-stay-in-place-instead-of-reset-default-locations.149644/