[Vx Ace] Prevent the player from going through walls when jumping

I have a small engine that allows you to jump back using the "jump" command.

if the player looking right, jump -1 X + 0 Y (jump back)

and so on with the other directions.

the problem is that the player goes through the walls. I already tried blocking the walls with the Yanfly Engine Ace - Move Restrict Region script but it can still get through them.

Is there any way to prevent this from happening?

Thank you.
What is the small engine you use for jumping?
What is the small engine you use for jumping?

jump image.png
Did you try "Through OFF/ON" option? Other than that...
I think you can do a simple conditional branch for it. This will flood your maps though...
For example: Set a player touch event next to your wall that triggers Direction Block Switch, when you move out of it disable the Switch. If it's on the left side, turn left side block and add that to your conditional branch that you made for jumping. If "Left block is on" do nothing, else... jump.
Did you try "Through OFF/ON" option? Other than that...
I think you can do a simple conditional branch for it. This will flood your maps though...
For example: Set a player touch event next to your wall that triggers Direction Block Switch, when you move out of it disable the Switch. If it's on the left side, turn left side block and add that to your conditional branch that you made for jumping. If "Left block is on" do nothing, else... jump.
is that in fact, I have the engine so that it can only be skipped if it is in a certain region but that would be very cumbersome.

I would have to place that region on the edges of the more than 200 maps that my game has, that would be very cumbersome.
The main problem is that the engine has no way to differ between a chasm and a wall - both are simply impassable.

However I can think of a few ways to handle this without having to spam events everywhere.

basically have your event sequence check the position in the direction with get location info.
What you are looking for is the terrain tag, which is zero by default for everywhere.

you'll have to go through all tilesets in the database and set the "walls" to terrain tag 1 (or whatever you choose), and if the calculated position has that terrain tag you abort the jump.

It's still some work, but you won't have to place events everywhere on 200 maps.
The main problem is that the engine has no way to differ between a chasm and a wall - both are simply impassable.

However I can think of a few ways to handle this without having to spam events everywhere.

basically have your event sequence check the position in the direction with get location info.
What you are looking for is the terrain tag, which is zero by default for everywhere.

you'll have to go through all tilesets in the database and set the "walls" to terrain tag 1 (or whatever you choose), and if the calculated position has that terrain tag you abort the jump.

It's still some work, but you won't have to place events everywhere on 200 maps.
the problem with the terrains is that the next terrain has to be revised, not the current one.

If the character is on the edge of a map and the next tile is a wall or roof, how do I check the terrain of the next tile? (next to character)
absolutely no problem - you'll need three variables anyway.
first step is to get player coordinates with the first two variables (it's in the game data section of control variable, no need for scripts).
then based on the facing direction add or substract from those variables to get the next coordinates (doesn't matter if one or two or more tiles away, just add the neccessary numbers).
then use get location info to load the terrain tag into the third variable with the first two being the target for get location info.

if you want to check multiple tiles in case of a longer jump you only need to repeat that for every tile between, and you can also check if the numbers are near the limits of the map borders (although that is a bit more complex because you'll need a script to get the current map size).

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-prevent-the-player-from-going-through-walls-when-jumping.142071/