Is it possible to have an event that is off the map?

Here's the use case: I have a very large sprite on an event that I'd love to be able to slide in from the right side of the map. As of now the only way to do this is have him spawn at the far edge, which means that half his sprite shows up very abruptly.

I can't imagine there's any real solution to this other than some fakery, like putting permanent black bars on either side of the screen that are within the map. But I do wonder if it's even possible in theory?

Thanks!
Yes, it's possible. You can bypass the checks that prevent events being placed off-map by directly editing their positional variables by scripts

This example works on my map which is 20 tiles wide. This script call places the sprite on X value 21 (off map) but places their actual map position at value 20. This event's movement code automatically slides from their realX position towards their map position.

this._realX refers to the position of the sprite on the map. this._x refers to their position on the grid. There is a slight difference between the two.

1703835731613.png


Try the above script calls only inside a movement route. This is because 'this' when called in a regular script call refers to the object that runs events, not the event itself.

EDIT: I am not responsible for any errors that come as a result of events being placed off-map. Good luck
Yes, it's possible. You can bypass the checks that prevent events being placed off-map by directly editing their positional variables by scripts

This example works on my map which is 20 tiles wide. This script call places the sprite on X value 21 (off map) but places their actual map position at value 20. This event's movement code automatically slides from their realX position towards their map position.

this._realX refers to the position of the sprite on the map. this._x refers to their position on the grid. There is a slight difference between the two.

View attachment 289959

Try the above script calls only inside a movement route. This is because 'this' when called in a regular script call refers to the object that runs events, not the event itself.

EDIT: I am not responsible for any errors that come as a result of events being placed off-map. Good luck

Wow this is fascinating! Before I start testing this, would you happen to know what being off the map does for the event's ability to move? If I set it's Through to on, can it walk onto the map with a Move Route?
Or you could just make an event with the first page having no graphic at all and then turn on a global switch to make it show up by selecting the second event page which should include some sprite...
Wow this is fascinating! Before I start testing this, would you happen to know what being off the map does for the event's ability to move? If I set it's Through to on, can it walk onto the map with a Move Route?
Nope. No idea. At that point you'd have more experience than I do with placing events off-map. From a quick glance, there are pieces of code that do not have checks that make sure they're dealing with valid map coordinates. I'd probably avoid setting _x or _y off-map and just stick with setting _realX and _realY offmap for your desired effect
Or you could just make an event with the first page having no graphic at all and then turn on a global switch to make it show up by selecting the second event page which should include some sprite...
Sure, but the problem is, the sprite is really big, like 5 tiles wide. So ideally I'd love to have the sprite slide onto the screen rather than just have half of it show up instantly.

Nope. No idea. At that point you'd have more experience than I do with placing events off-map. From a quick glance, there are pieces of code that do not have checks that make sure they're dealing with valid map coordinates. I'd probably avoid setting _x or _y off-map and just stick with setting _realX and _realY offmap for your desired effect

Thanks, I'll be sure to report back!
or, you can make the map larger to have some room to either side, off camera.
"camera" being "the square around the player who'd be in the center"
anything that is further away from [the player] + [the size of the screen around him] without [the player] ever being able to reach [that area] by being [blocked off by impassable tiles], would be *off camera*
or, you can make the map larger to have some room to either side, off camera.
"camera" being "the square around the player who'd be in the center"
anything that is further away from [the player] + [the size of the screen around him] without [the player] ever being able to reach [that area] by being [blocked off by impassable tiles], would be *off camera*
For sure that's the fallback plan, where I'll just have black bars around the borders to fake it, but I'd love to exhaust any simpler solutions first ☺️

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-have-an-event-that-is-off-the-map.164247/