Player can walk through event, but event still bound by passabilities?

Hi,


I have some events which I want the player to pass through almost as if they aren't there. It would be frustrating to get stuck behind them.


The events are people though, so I have them moving around, and still want them to be bound by passabilities so that they can't walk through walls etc.


So basically, to the player, they are THROUGH, but otherwise they are normal.


How could I implement this?


I have searched through the base scripts for "through", and even gone through every line with "event" in to try and find where the passabiities are set, but haven't found anything yet. I assumed there would be one line I could toggle.


I wouldn't be too upset if all events were passable even; mainly though if I just know what line handles event passability, I can edit it myself. Or, if there is an in-built way the game can do this out of the box.


Thanks, Amy
Code:
Game_Player.prototype.isCollidedWithEvents = function(x, y) {
    var events = $gameMap.eventsXyNt(x, y);
    return events.some(function(event) {
        return event.isNormalPriority() && !event.yourCustomEventProperty();
    });
};

You need to define how you will assing the event as 'passable by player' and use the 'yourCustomEventProperty' to check for it.
Absolutely perfect, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/player-can-walk-through-event-but-event-still-bound-by-passabilities.63097/