MV Random event spawn by region

I tried to search for this and only found results for previous RPG maker releases.


I am wanting to create an event that is triggered by user button press and it appears randomly in a specific region on a map.  I am debating about random repop on map change or some sort of randomized timer.  I am leaning toward some sort of timer as I wouldn't want the player to just constantly change maps to farm the event.


Does anyone know if something is already out there and if not I would really appreciate someone helping to let me know how painful it would be to script this.


Thanks!
Another one I did that might be of interest, too:


https://galvs-scripts.com/2016/05/14/mv-event-spawner/
I think the plugin from Galv is closer to what I am looking for.


The issue I am having is that if I set an autorun event on the map to do a script call with the permanent flag set to false, the event never shows up.  If I set the flag to true then it does show up however when the player leaves and then returns to the map then the first event is in the same place again and a duplicate event is randomly placed in the region.  Should I be calling this some other way?


Thanks!


Update:  It looks like the event is always (at least the past 3 attempts) to spawn in an area that doesn't have a region number set.  I found this by setting the overlap script call to "all".  It is always spawning on the exact same tile when i have the permanent flag set to false.
Check you have everything set right. Check out the demo for examples, it has example of spawning events on random regions both permanent and temporary.


Also, permanent events don't save where they have moved to if they moved. They are saved where they are spawned to, so if you leave the map and come back they will be at the position they spawned on (like normal events).
I matched the settings that you had in your demo and things look to be working perfectly. Thanks for the help!
http://mvplugins.com/plugin/izyees/Izys%20Random%20Event%20Location


eh, am I too late?  :popcorn:

Original thread: https://forums.rpgmakerweb.com/threads/mv-random-event-spawn-by-region.62605/