Adding script for jumping command?

Hello there, 


I am pretty new to RPG Maker VX ACE. I generally understand how it works, but I have never had to script anything in my life, so I have no idea how it works. 


However, during the process of making my game, I decided that I wanted the party (player + followers) to cross a river by jumping on waterplants.  Unfortunately, only the player jumps on the plants, the followers just dash through the water. It looks really stupid. 


So after looking it up online, I found this topic: 






In here, there is a snippet suggested which should fix the problem, however, I have no idea how to insert this little piece of script in the script of my game. I've tried it in a lot of different places, but I keep getting an error. 


Could someone tell me where to insert this script? 


I'm very grateful to anyone who can help me. 🙂
Welcome, first of all! And believe me, I feel your confusion. When I first started out, I had no idea what to do with scripts.


Thankfully, there are plenty of people out there, willing to help a newbie out. 😉  


First, find the tab just above your map. On that tab, one of the icons is a piece of paper with a pencil. Click on that. It will open up a window with a great deal of objects on it. Scroll down the list until you find "Materials". Take that piece of code, make sure to select all of it (failing to paste even the last part will result in a missing keyword error) and paste it in a section below the words "Materials". In fact, under materials, there should be something that says "Insert here". You may put it in any slot below those words, (you can create more by right-clicking and pressing "Insert") but you MUST (and I mean MUST) place your script ABOVE "Main" and "Main Process".


If you need any more help navigating, please consult this handy-dandy picture I included! I have your main places circled. As you can see, I'm already using a couple of scripts.  🙂


Help.png


Also, assuming we are talking about the same bit of code, the one created by Galv, that particular snippet is formatted incorrectly on this forum, due to certain issues. Here, I have it laid out properly for you. It should work if formatted in this fashion:

Code:
class Game_Player < Game_Character
  def jump(x_plus, y_plus)
    super
    @followers.each { |f| f.jump(@x - f.x, @y - f.y) }
  end
end

If a script's not formatted in the proper way, you'll get errors coming out of the weirdest places. Trust me, I know. 😉  Copy/Paste what I have put above into your project, and you should be pretty much set. If you come across any more issues, or have any more questions about this awesome engine, don't hesitate to send me a message. I'm always here to help!
@Badweatherforcast


Thank you so much! It works now! You're amazing! 😉


(When it worked I literally squealed and ran around my room for a few minutes, I've been stuck on this forever, whatever I tried just wouldn't work.)
@SenpaiK I remember I had a similar reaction when Galv gave me that snippet.  However...


There is no need to quote a whole post in your reply, especially when it contains an image.  It makes scrolling down the page a bit tedious and for some people quite slow as image etc. has to load up.  All you need to do is use the convention that I have for this post i.e. @username 
@SenpaiK Haha, awesome! I'm glad it's working! 🙂  
What button jumps? I put in the code in the right place and loaded up the game and hit space and A LOAD of other buttons and I can't find the jump jutton
Necro-post notice: Gamingstar

Please start a new thread, as your query is not the same as the OP. Include the snippet in your opening post so that people do not have to go hunting for it. There is obviously something odd going on because it should work with either space bar or enter.

Original thread: https://forums.rpgmakerweb.com/threads/adding-script-for-jumping-command.65887/