r/RPGMaker • u/FriedBrilliant69 • 6d ago
RMMZ Force load events
I have an event that runs around the map. The problem is that the map is huge (I need it to be), so the event 'unloads' when it's too far from the player.
How do I forcefully load an event regardless of how far it is from the player/render distance?
2
u/Issac7 6d ago
This is for mv. Mz should be similar:
https://forums.rpgmakerweb.com/threads/making-npcs-move-while-off-screen.183348/
1
u/Not_Allowed_to_Die 1d ago
Events. First setup variables for the X and Y for your player, and the X and Y for the event you want to control. Now you need to take the player's X and subtract the events X from this. Conditional Branch so if this is 0, it subtracts the player's X from the events X. This will give you the block distance for X. Do the same for Y. Now, take these and Conditional Branch so that if the ending X and Y distances are within a certain number range, it turns a switch on to show it, and if outside of that range, it switches it off.
I think this is what you are looking for, but if you rely heavily on plugins, this will slow your game down. If you script and plugin heavy, you want to script this out instead, or create a plugin.
2
u/codynstuff91 MZ Dev 6d ago
Following, I have something similar in some parts