Difficulty with Making Wandering Monsters for a Side-Scroller

Cheers, RPG Makers!

This is my first post!

Thanks kindly for being such a generous community of developers and educators. As I'm learning how to manipulate RPG Maker MV, this forum has proven to be a tremendous resource.

I've only spent a couple hundred hours with the app so far, and the project I'm working on now is a side-scroller, but I can't get the wandering monster events to move on the map in the same manner as the player.

The plugin I'm using is pgeogheg's RPGMaker-Side-Scroller-Plugin, which you can find here: https://github.com/pgeogheg/RPGMaker-Side-Scroller-Plugin

I don't know much about tweaking the code for these things, but I switched one of the gravity values from 120 to 45 and that made it work well for my player to jump a height of 3 tiles and a distance of about 4 or 5 tiles.

If I knew what to swap out in that plugin to switch the game mechanic from targeting the player to targeting THIS EVENT, then I think that would be a good solution for my issue. I mean, I could keep the player's side-scrolling plugin as-is and add this new modified plugin into the game along with it. One plugin would handle the player, and the other should handle anything marked as THIS EVENT.

Would any of you be so kind as to explain which terms in the script I could replace to make it run like that?

Any guidance is much appreciated!

Cheers!
davaflava
I'm having trouble understanding what you're trying to accomplish here. Are you just trying to modify the gravity of enemies/events? Are you trying to make certain events not effected by the side stroller mechanics at all?
It would help to know exactly what you're trying to do here.
The plugin I'm using gives side-scrolling gravity and movement to the player.

However, the gravity and movement mechanic of that plugin does not take effect for my wandering monsters, which are set up as events.

As it is, those wandering events still move as if the map is top-down.

I'd like to have the events moving around on screen the same way the player does.

So, I figured if I could add a modified copy of that plugin that gives side-scrolling mechanics to events, then that might work.

I just don't know much about the terms in the script.

What must I change in the plugin's script to get the side-scrolling effect to work on both the player and events?
Oh I see, I glanced at the plugin and saw that it was applying movement changes to game_characterbase which both the player and events use.
However on closer inspection only the player has gravity enabled by default. You can set the _gravity property to true on an event with a script call. However the event won't jump on its own if it runs into walls as part of its movement. You could trigger a jump by setting the _gravityJumping property (maybe as part of a movement route or adding some extra logic to the plugin to check if a wall is in the way) to a value greater than zero, probably 40 like you're using for your player.
Oh I see, I glanced at the plugin and saw that it was applying movement changes to game_characterbase which both the player and events use.
However on closer inspection only the player has gravity enabled by default. You can set the _gravity property to true on an event with a script call. However the event won't jump on its own if it runs into walls as part of its movement. You could trigger a jump by setting the _gravityJumping property (maybe as part of a movement route or adding some extra logic to the plugin to check if a wall is in the way) to a value greater than zero, probably 40 like you're using for your player.
Cool. I think I follow what you mean there.

In its present state, I'm using region restrictions to keep monsters from walking through the sky as they please.

Jumping events sounds awesome, but I'll try adding a script call to apply the gravity to events, like you suggest, first. I'd be stoked enough getting them to fall.

Thanks kindly for your help!

Original thread: https://forums.rpgmakerweb.com/threads/difficulty-with-making-wandering-monsters-for-a-side-scroller.150992/