Auto-jump

I'm still trying to figure out why my code didn't work for you. It works perfectly on my end.
Idk, I searched the function "name", it doesn't exist for Game_Event which actually the error makes sense. Why not do this.
Code:
if Input.dir4 > 0
  jump_events = $game_map.events.values.select { |event|
    event.instance_variable_get("@event").name =~ /<jump>/
  }
  x1 = $game_player.x
  y1 = $game_player.y
  direction = Input.dir4
  x_mod = direction == 4 ? -2 : direction == 6 ? 2 : 0
  y_mod = direction == 8 ? -2 : direction == 2 ? 2 : 0
  x2 = $game_player.x + x_mod
  y2 = $game_player.y + y_mod
  event_under_player = $game_map.events_xy(x1, y1).any? {|event|
    jump_events.include?(event) }
  event_in_direction = $game_map.events_xy(x2, y2).any? {|event|
    jump_events.include?(event) }
  if event_under_player && event_in_direction
    $game_player.jump(x_mod, y_mod)
  end
end

EDIT:
Now I tried to make this out of boredom by pure eventing. And this is actually easier than you probably guys thought.

Here is my test case
Screenshot_449.jpg

Here is the important aspect you need to know
Screenshot_1.jpg

Result?
autojump2.gif


Edit2:
Uh, this post made into page 2. I hope people who read this would bother to read the second page.
It works for me, though...that's what I'm confused about. XD

Ohh, it's because my test project uses VE Basic Module, which added it.
I also get the error. Victor engine makes sense. Theo your code also did not work.
But your solution works. I missed the part about it touching the event, I was focused on stepping on it.
Have you tried, instead of putting the jump events where the player walks, putting them in the gaps between the islands?

That way you can make the player jump 'over' those events. Make sure the events priorities are 'same level as player' (so the player can interact with them while standing in the tile next to them) and you can use 'player touch' or 'action button' trigger (your preferred) to have the player activate the events.

Then in the events, just check which direction the player is facing and do a move route jump accordingly.

Sorry if I am missing the issue.

Edit: Like Theo's idea for events that I completely missed before posting this.
Both solutions work very well!! 😀 Thank you so much guys, you're the best!!
At the moment I'll use Theo's solution bc it is easier understanding for me and I've read it's better to avoid parallel process whenever possible ^^
The main reason I did it with code rather than events is so that you can just copy/paste an event wherever you need to be able to jump and never think about it again no matter what directions you can move in to/from it, because it looks ahead to where you're trying to jump and makes sure there's also a jump event there. Doing it with events is easy, but it also means you need to make sure you've set up the conditional branches appropriately for each one.
To someone who just got started, I don't think that would be the best approach. They would start to rely on scripts and not discovering what you could do with eventing. Meanwhile, you could teach them what is the event capable of.

Get them to know how to create an event.
Then you could start introducing script solution, "yeah that's troublesome, right? Here is the script to simplify your problem".
That's fair.
How can I use the auto-jump code without requiring VE?
How can I use the auto-jump code without requiring VE?
Use mine
Alright, going to test it out later today. 🙂
I had my jump events all evented so far, but a script would be quicker.

Edit: Nope, can't get your script to work TheoAllen 🙁 no clue why not, but nothing is happening.

Player touch, action button, below or same as character, nothing happens.

Original thread: https://forums.rpgmakerweb.com/threads/auto-jump.124444/