I've got an interesting problem with Yanfly's Event Spawner in RPG Maker MV... All I want to do is spawn events that persist on the map and move on a set path from then on. The plugin seems to work well, but it gets wonky when I spawn an event with a move route.
The spawned event doesn't move as expected when the player leaves the map and returns to it. It seems to me that the spawned event remembers its X,Y position when the player leaves the map and retains it upon returning to the map, instead of behaving like normal events do, where they reload into their original X,Y positions when the player leaves the map and returns...
This wouldn't be such a big deal if not for the fact that the events do not retain the memory of their progress along their move routes. This causes the spawned events to have their move routes messed up when exiting and returning to the map. Interestingly, this is not a problem when saving the game and reloading the save, as both the X,Y positions and the move route progress are saved when saving and reloading.
I tested this in a brand-new project with only the one plugin, so I'm fairly certain it's a problem with Yanfly's code and not a conflict with another plugin or an issue with my eventing. As far as I know, there's no new revisions to this plugin that I don't have (I have V1.02) so I was looking to tweak the plugin maybe myself to fix the issue, but unfortunately while I am somewhat well-versed in JavaScript, I am not terribly familiar with how MV works under the hood (yet.)
I attempted some workarounds, like spawning an invisible event that persists and acts as a "spawner" for the moving events (which were changed to NOT persist, so that they could be freshly spawned every time the map loaded by the spawner event) but I hit another road block there when I discovered that if you use "Erase Event" within an event spawned by Yanfly's event spawner, the event disappears for good and doesn't come back when reloading the map, like a normal event.
I'm not sure if all of this weird behavior is a bug or a feature, but I really wish these spawned events would just behave in the same way as the vanilla events.
To my more experienced game makers, any advice? Is there a straightforward way to patch Yanfly's plugin to make the event behavior more consistent with the ones made in the editor? Does anybody have advice for a workaround? Are there any more details I could share that would make determining either easier?
Here's a video somewhat demonstrating my problem:
Thanks in advance to anyone who can provide help or insight.
The spawned event doesn't move as expected when the player leaves the map and returns to it. It seems to me that the spawned event remembers its X,Y position when the player leaves the map and retains it upon returning to the map, instead of behaving like normal events do, where they reload into their original X,Y positions when the player leaves the map and returns...
This wouldn't be such a big deal if not for the fact that the events do not retain the memory of their progress along their move routes. This causes the spawned events to have their move routes messed up when exiting and returning to the map. Interestingly, this is not a problem when saving the game and reloading the save, as both the X,Y positions and the move route progress are saved when saving and reloading.
I tested this in a brand-new project with only the one plugin, so I'm fairly certain it's a problem with Yanfly's code and not a conflict with another plugin or an issue with my eventing. As far as I know, there's no new revisions to this plugin that I don't have (I have V1.02) so I was looking to tweak the plugin maybe myself to fix the issue, but unfortunately while I am somewhat well-versed in JavaScript, I am not terribly familiar with how MV works under the hood (yet.)
I attempted some workarounds, like spawning an invisible event that persists and acts as a "spawner" for the moving events (which were changed to NOT persist, so that they could be freshly spawned every time the map loaded by the spawner event) but I hit another road block there when I discovered that if you use "Erase Event" within an event spawned by Yanfly's event spawner, the event disappears for good and doesn't come back when reloading the map, like a normal event.
I'm not sure if all of this weird behavior is a bug or a feature, but I really wish these spawned events would just behave in the same way as the vanilla events.
To my more experienced game makers, any advice? Is there a straightforward way to patch Yanfly's plugin to make the event behavior more consistent with the ones made in the editor? Does anybody have advice for a workaround? Are there any more details I could share that would make determining either easier?
Here's a video somewhat demonstrating my problem:
Thanks in advance to anyone who can provide help or insight.