Hello. I've been looking around without much luck.
What I'm looking is a plugin that moves the camera forward one tile when the character stops walking.
Let me explain: The character is walking, the camera is centered on him, as it is by default. but when the character stops the camera moves one tile in front of him. That's it.
The same in all directions.
Can anyone help me?
I dont have that issue, can you make a gif? or do you have plugins
that alter the camera? or events to do so?
It looks like that approach probably wouldn't work in multiple directions though. After this gif, if the player moves left or right, the camera will stay offset upwards. Moving down will only bring it down by one tile, even though it now needs to move by 2 (one to center everything again, and one more to create the offset).
Also, if you walk up to a wall and keep repeatedly pressing the 'up' key you can move the camera as far up as you'd like.
Well, turns out, this is actually a rather tricky problem. Not just the logic of how to re-center and move the camera to where it's needed (since the extra scroll can remove itself depending on how the player walks), but also when it comes to not breaking near the edges of a map. That's certainly not how I was planning to spend this afternoon, but at least now I know a lot about how RPG Maker's camera works xD
Give this a try:
You're right, there are some flaws with the system I built, but you could modify by checking the players X & Y and if the camera is greater than 1 tile away from the player then it shouldn't turn on the camera move switch.
You could use the same x & y check to see if the camera is on the opposite side of the player (for example the camera is one type up from the player when they are moving down) and if so you can tell it to move the camera down 2 instead of 1.
Another option that comes to mind is using something like SRD Camera Core and maybe Yanfly's Event Spawner. The logic of the event would need a slight adjustment, but it would give you more control over the way the camera moves.
You could use the event spawner to spawn an event that Camera Core would want to follow (using the Focus Camera plug-in command). Every time the player moves you can use the clear spawned events command to remove the cameras focus, then use a Reset Focus plug-in command with a few frames to snap the camera back to the player.
Well, by now I've already made a plugin that does exactly this, so using it is probably much easier than remaking its functionality with events/other plugins 😉