This is a little tutorial on how to make an easy gliding system. This is a system that you probably recognize from the Pokémon games.
The reason I've made the system was that, I've seen it on different places, but I never got it to work, so after some practice in eventing and scripting, I made this.
Uses 1 switch, 1 variable and 1 common event.
1. Make a new Common event and name it for example "Gliding system", set the "Trigger" to "Parrallel" and choose a switch to start it with.
2. In the common event, make a "Control Variable" command that changes a variable called "Hero Terrain Tag" or something like that and have it set to the current Player Terrain Tag.
3. Make a "Conditional Branch" that checks if the "Hero Terrain Tag" is equal to 1(or whatever you want it to be).
Have the checkbox "Set handling when conditions do not apply" checked.
4. Make another "Conditional Branch", go to the 4th tab and choose "Script".
Write "$game_player.moving?" in the text box.
This stops the player from continue running when he reaches an impassible tile but is still standing on a "glide" tile.
You do not need to have the "Set handling when conditions do not apply" checked.
5. Now you need four more Conditional Branches that checks if the player is facing down, left, right and up. (the 3rd tab)
You do not need to have the "Set handling when conditions do not apply" checked.
6. Inside each branch, have a "Set Move Route" event command and have it make these commands:
Move Animation OFF (prevents the player from walking when he is gliding, have it on and you'll see what I mean)
Move Down/Left/Right/Up (depending on which branch you are in)
Have the "Ignore if can't move" checked.
Do
NOT have the "Repeat Action" checked
7. In the "Else" part of the first conditional branch, have a "Set Move Route" command and have it say:
Do not have any checkbox checked.
This is what the common event should look like.
DEMO
For the lazy ones
[Download]Filetype: .exe
Filesize: 258 Kb
Host: MediafireThen, where you want the player to glide is quite simple to do. In the Tilesets in the Database, choose the "Terrain Tag" button and change the tiles you want to glide over to 1(or what you set it to in the 3rd step) and of course set the switch you chose in the first step to ON.
Credits would be appreciated but not required.
If you have questions, PM me or post in this thread.
Regards
Stripe103