Jump to content
  • entries
  • comments
  • views

Lesson One: Ledges and Jumping



Okay! As requested, I'm writing up the first lesson on events, this is a simple event for jumping down ledges in a pokemon style.


You will need to make a common event, so as to not need to repeat this event again and again. Within that common event you will make a simple set of events. You will need a conditional branch to make sure the player is pressing down, so they don't jump off the ledge just by approaching.


Next you will do a move event: Within that you will do a series of options. Turn Down, Lock Direction, Turn off Movement Animation. (These steps are just for aesthetics, but are just as important.) Then Wait 5 frames, so the aesthetics go into play, (The most important part goes here) Add an appropriate SE so that it isn't boring! Then Jump Y +2, then turn off Direction Fix, Turn on Movement Animation, Wait 5 frames.


Pretty simple, you can also choose to follow that with 'gather followers' but it will cause a slight lag while they join you, otherwise just moving gathers them.


Keep in mind that the event I made was based off a cliff that was one wall height, so you jump from the spot you are standing on, passed the wall segment and onto ground you can move on, if your cliffs are larger and you want to jump down, just increase the number on the Y axis as needed.


Now the final part, sadly this will require as many events as you need spaces to jump down and every time you jump, so it can get event heavy. Within those events, simply put them on event touch and below player, then just have them call the common event. Will work wonders.


Now this should be pretty obvious, but you can use this for any direction, not just for down, to include all sorts of jump events in your games, simply change the X or Y axis appropriately (+Y is down -Y is up, +X is right, -X is left) and the conditional branch to be pushing the right direction button.


If you want to have all the options in your game, be sure to put them all in different common events and have the events on the ledges call the right one, this will prevent you from doing silly things like jumping to the right or left when walking along a down ledge, or getting stuck in places you shouldn't be. (Trust me, it isn't pretty)


Also, I do realize that you can do this with the 'player is facing' conditional branch too, the reason I do it this way is to have the player consciously jump when they jump, so they have to have an interaction and don't fall without meaning too, or needing to push the action button, they just have to push the direction they need to go.




Screen shot for your convenience!


So now I ask, what tutorial shall I create next? I have a few suggestions and I am looking into those, but I would love more suggestions!


Edit: Tigerbite has shown me another way to do this using a couple of variables and region IDs instead of so many events. Now to do this, you will need some sort of switch that you turn on early game, so that you can run the common event in parallel process, so it is always checking. Next you will simply need to make two variables, to constantly check the players X and player Y map position. Then place a get location info for region ID based on players X and Y variables,


Next you will need to make an additional conditional branch to check if the variable you set up for location info matches the terrain tag you placed there, in my case '4'. Then you only need the one constantly running common event, or if you make multiple direction jumps, the up to four constantly running common events. You then just need to place the terrain tag of the appropriate number at the ledge you want to be able to jump down.



1 Comment

Recommended Comments

You can actually do the Region event code even easier by using the following in a conditional branch script box: 


$game_player.region_id == n

where n is the region code you want to use :P

and if you want to make it so that in different maps you use different region ID's you can set up a check map conditional branch so it'll be if player is in map 3 then check if region ID 4 is being stood on, if so make player jump :D 

$game_map.map_id == n



where n is the map ID 

  • Like 1

Share this comment

Link to comment
Top ArrowTop Arrow Highlighted