Creating Enemy mobs in regions

If you have a second page on that event, you don't need the branch on the first page.
Without the second page, the player cannot move! Literally no movement whatsoever.
Could it be something in the script itself that only allows one cloning?
I'm not telling you to get rid of the second page, I'm saying the first page only needs the script call and the switch activation. You don't need the conditional branch checking for the switch being off.

I'm not 100% sure. I've taken a cursory glance at the script's code, but I'm too busy right now to really delve into it and look at what it's doing behind the scenes.
Conditional branch removed, no change.
I'll see if I can take a bit of time tomorrow to properly look into this for you.
Understood.
So I THINK I got the problem solved and my idea to work. Couple of things I discovered while continuing to work on the solution overnight...
  1. The actual script has a bug. Line 78 should read "key_id = @events.keys.max + 1 || 0".
    The original version is "key_id = @events.keys.max || -1 + 1 ".
    The original will eat the last event created on the destination map to create the clone. This fix was found here:
    Spoiler: spoiler
    IF this is not allowed, please delete; I just want to give credit where It's due.
  2. During yesterday's testing, the switches were not firing 100% of the time, and I'm not sure why. I created a new project with only this script and switches are firing as expected.
So the actual enemy encounters only need to contain the Battle processing. Be sure that you check off "Can Escape" if you want to be able to run! My screenshot shows what happens when you run (the monster backs up) and what happens when you win (the event disappears).
The Spawning Event is set up as a conditional branch where if a control switch is OFF then the event runs. The event consists of waiting a frame then spawning in all the enemy events to their regions, then flipping the control switch to ON. Page 2 is blank, with the Condition: Control Switch is on checked off. The screenshot shows one enemy going to region 1, one going to region 2, and a third going to both regions. Everyone shows up where they should, disappear when defeated and back up when escaped from. =)
The key to making this respawn machine run is the transition event. Whenever the player goes back to where enemies should spawn, the transition event also moves the Spawn Event control switch to OFF. This sets off the Spawning Event again!

I will implement this setup into my actual game to verify it runs this way before declaring victory. Stay Tuned!
And sorry for the double post!
Oh ace, well done! I feel slightly less bad about struggling to crack the issue if it was a bug with the plugin itself.
It's not working! Calling for events is resulting in either nothing appearing or events from an incorrect map!
Edit: Apparently when I call for Map ID 011, it is spawning events from Map 009. I made Map 011 just now to hold enemy events. When I call for Map ID 013 (which doesn't exist) IT SPAWNS THE ENEMY. How is this possible?
The "nothing appearing" issue has been solved. Developer Oversight regarding regions >.<
Seems to have worked okay for me with the fix.
1593383636149.png
I'm getting the Map ID's from the map properties screen. I may have deleted other maps in the past, but that I'm using the ID's that are displaying right now. Is there something in VXACE that is used to track Map originations and uses those #'s instead?

For the record, I can cope with using the incorrect Map ID. I'm just trying to figure out why it's pulling the correct event ID from wrong map. and weirder, why a map ID that doesn't exist yet is recognized.
I'd Love an answer to "Why do I need to use an incorrect map ID?" but other than that, This thread can be closed.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/creating-enemy-mobs-in-regions.123359/