MV Making an event passable for player only (maybe using canPass or isPassable?)

I want to have a "magic wall" event that only the player can pass through, but not other events. I'm using Yanfly's YEP_CoreEngine, which makes it so that events with a priority of Above or Below characters do not block other events, so I can't achieve this by simply changing the magic wall event's priority. I've already tried a couple of solutions that briefly make the wall or the player "Through" when the player is next to the wall, but that causes other problems.

I noticed in rpg_objects.js there is a "canPass" function and an "isPassable" function, but I don't know if (or how) I could use this for what I want. Or maybe there's another solution. Any ideas? Thanks.
Any event with priority Below characters is impassable for events but passable to player.

EDIT: sorry, just read your full description...
What are you planning to do with that check passability function anyway? Constantly check if the tile in front of event is passable or not? Not gonna work since that's exactly what Yanfly plugin change on event movement. It counts as passable if the event can move on it.

I can imagine that you are making somekind of puzzle that make use of "Skip if cannot move" function.

How about turning that moving event priority into below characters as well?
IIRC that plugin restricts event movement if both events shares the same priority.
Like event with below characters cannot pass another event with below character.

If you need the moving event to be "Same as characters" no matter, can you at least make them temporary turn into below characters (by switching page) when moving?

Worst case is making use of region ID to draw the event boundary. It's better choice than using check passability function.
1629254431311.png
IIRC that plugin restricts event movement if both events shares the same priority.
Actually, no. That would make more sense, IMO, but it actually makes it so that events that are both "below" or "above" pass through each other. Only "Same as Characters" block each other.

EDIT: To answer your other question:

What are you gonna do with that check passability function anyway? Constantly check if the tile in front of event is passable or not?

I'm using Galv's Puzzle Functions plugin, which allows you to trigger an event just by being adjacent to it, so I wouldn't actually need it to be a parallel process running all the time, I could make it so that it only runs when the player is right next to the event. Maybe I should have mentioned that in the first place, but I wasn't sure if it was necessary.

EDIT EDIT: Actually, now that I think about it, the "magic wall" event's trigger could just be set to "Player touch", so I wouldn't need to use Galv's plugin for that. I'm now starting to think this whole thing is a LOT simpler than I thought.

EDIT EDIT EDIT: I'm an idiot. The solution was so simple I didn't see it. All I had to do was make the "magic wall" event trigger Player Touch, and then make a self switch to a page with a parallel process that runs a Set Move Route (Player) like:

Through On
One Step Forward
Through Off
Self Switch Off

@Kuro DCupu
Thanks for your time trying to help me on this, you rock!, but it turns out it was just a brainfart on my part. My bad.
Then what about the otherwise? Switch the "wall" to be "same as character" when the event is actively moving. You don't need it to be real time right?

Need context of your purpose.
Can't expect people to come up with a solution by leaving them making their own assumption.

If I want to make an event unable to pass an area, then from the first place I just have to manually control the event to not pass the area.

Since you don't do that I assume you make use of random / approach event.
IIRC that Yanfly plugin also include function to make event random / approach movement to be restricted to designated region area.
Either you are unaware or I'm making wrong assumption.
But if you use custom movement, then I assume you make use of "repeat movement" and / or "skip if cannot move" function. In that case switching event page is easiest solution I can come up.

As I said before, worst case is you are gonna do regional check manually.
@Kuro DCupu

I kind of explained it in different parts, which I guess makes it a little confusing, so now I'll explain it now in one fell swoop.

I wanted a "magic wall" that only the player could pass through, but not other events (i.e. guards). This magic wall has to be an event, as opposed to a tile, because it can be placed by the player after map creation, so it's not in a fixed location. I did mention that the wall needed to be an event, but I didn't explain why or that it was absolutely necessary. This of course makes regions unusable, since they are fixed.

The simple solution that I didn't see at first was to just make it so that when the player collides with the "Same as Characters" event, the "magic wall" event switches to a self switch (let's say B which runs a parallel process like:


Set Move Route (Player) > Through On > One Step Forward > Through Off > Self Switch B: Off

And that's it. That way the player passes through the wall, but other "Same as Characters" events never can. It was just one of those things where I made it more complicated than it needed to be. Bad Hank!

Original thread: https://forums.rpgmakerweb.com/threads/making-an-event-passable-for-player-only-maybe-using-canpass-or-ispassable.139687/