Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Jump system with animation

This is my first tutorial so I appologize if I'ts not clear. Ok the first thing we're gonna want to do is make 4 common event. 1 for each direction.

They should look something like this.
jumpup.jpg
The only thing you will have to change in each event is jump. It will be +0,-2 for up, +2,+0 for right, +0,+2 for down, and -2,+0 for left.

Now that we have all 4 directions done we're gonna add 1 more common event. This event will be set to parallel process and you can name the switch whatever you like. I used activate jump system.

This event should look like this.
jumpsystem.jpg

Now for the final event. This one you are gonna want to put on your starting map, and make sure it is set to parallel process.

The last one should look like this.
jumpsystemcontrol.jpg

And thats it. I hope this was helpfull. ;)
 

regi

Sponsor

It's a nice idea, but I think you could clean up the coding a little more.

For example, why do you need 5 different common events? Do you really need one for each direction? The coding is fairly simple, so you could easily move them all into one common event.

Also, why turn on and off switch 3 just to show a simple animation? Since it only happens when you jump, just put the Show Animation in the first conditional branch. There's no need for the switch or second branch.

You have the basic concept down, but it can still be simplified a little. Try not to overdo it; it's not a big deal on such a simple common event, but in more complicated event systems it might be a pain. But good job nonetheless; it was a clear and easy to understand tutorial.
 
The reason for the on and off switch to show the animation is because if you don't use it. Try standing next to a wall and jumping. Your character won't jump but the animation will play. That is the reason for the switch.
 
When using this code my character jumps fine when going from side to side, but when he jumps up then he faces down when I hit the jump button again. He basically keeps jumping back and forth between the same two tiles. I am so confused...?
 

Zeriab

Sponsor

It's a tutorial on how to make an event system. It's perfectly fine here.
It would also be fine in the Eventer's Corner, but there is no reason to move it.

You should not have posted a message to get our attentions. Instead report the post using the report button and write it there.
Right now you practically necroposted without adding any content. Please refrain from doing so in the future.
Feel free to report if you get such concerns again :)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top