Anybody know to to create a simple jump?

No coding experience, and I have an idea for a platformer, but the coding for the jump is restraining me from continue forward, if you can help me I’d really appreciate it

Here you mught find something you need for sone movement

1 Like

I was working on a set of ways to make a character jump, though the project is still in progress, I have three different gravity systems that don’t have the gravity function coded into them, feel free to pick ur favorite or the easiest one to use. Here’s the project: gravity in progress.wick (102.6 KB)
It’s easy to add platforms because I made it so that you could copy-paste some premade ones in the project (if that’ll help), and if you’ll come by any trouble in the project, let me know. Though, if you prefer the coded gravity, here is where you could find it:

If you’d like to just learn more about gravity, here’s a great site @Greg showed me that teaches coding and talks about gravity in this link: https://www.w3schools.com/graphics/game_gravity.asp

2 Likes

well there are 3 things you need for a jump to be possible: 1. you need a solid wall, like a ground. 2. you need keyboard control, like up, left, and right. 3. you need gravity, something to constantly pull you down.

i will give you the instuctions for these 3 building blocks for a jump.

  1. in order to create a ground, make a character, and the ground. make your ground a clip and name it “ground”. turn your character into a clip and open the update script. add this code:

if (this.hitTest(ground) ) {
this.y +=10;
}

  1. to make keyboard control, open the keypressed script for the character and add this code for the jump:
    if (key === “up”)
    this.y-=any number

  2. open the update script (again) and add this simple code:
    this.y+=any number

hope this helped! :)

1 Like

Thanks for the tips and help guys =)

you’re welcome! :)