MZ "Cannot read property 'x' of undefined" when spawning events with VisuStellaMZ Events and Movement Core

1747774292534.png

So I'm trying to make this event spawn multiple events placed randomly around the map, however I keep getting the TypeError noted in the title. Does anyone know how to fix this?
Use this plugin instead, is much simpler than whatever your doing...
Use this plugin instead, is much simpler than whatever your doing...
I tried it but unfortunately got the same error.
the error basically says that you try to set the X-coordinate of an event that doesn't exist (is undefined).

and to prevent lag you should break the loop and switch the event off when you have enough events spawned...
I made a copy of your event without the loop and it seems to work as expected.

So, a couple of things:
  1. Get rid of the loop, because:
    1. parallel already means that you will be looping through this
    2. the loop has no break condition, which means that it will go on indefinitely
  2. Share with us a screenshot of the dev console showing the error. Since you say you got the same error with another plugin, I'm suspecting that this particular event is not the problem.
  3. Also, try not to unnecessarily crop the screenshots. The ID number in the event's title bar is not visible, but this is important to rule out that you aren't trying to self-spawn the event (e.g spawn event 6 using event 6).
  4. Share with us a screenshot of the Plugin Manager, too.

1747805433420.png
Did you check the very basics, like that map 1 is still in the plugin settings as a preloaded map? And that you have that event id on the map? And you're using a template name? Do you have those settings configured?

EDIT: Actually the event id doesn't even matter as you're calling a template, but yeah, are your plugin settings configured correctly?
Alright, my mistake, I didn't specify the map ID with the second plugin. I also removed the loop. It's working now, thank you!
So you still didn’t get it to work with VisuMZ_1_EventsMoveCore? In any case happy you found a way to make it work. Please user the report button to report the thread as solved!

Original thread: https://forums.rpgmakerweb.com/threads/cannot-read-property-x-of-undefined-when-spawning-events-with-visustellamz-events-and-movement-core.177806/