I need help making a Mario like jump system I am very new

I need help making a Mario like jump system. by this I mean a sprite going up then slowly coming down until it collides with a different sprite. Also I am extremely new to coding so I would appreciate the help :slight_smile:

Welcome Liam.

This tutorial might get you started doing what you want to do:

https://imagnity.com/android/flappy-copter-create-a-game-like-flappy-bird-from-scratch-using-app-inventor/

This bit of code might help too:

thank you so much, I will try it !

hey man soooooooooooo. its not working, its just making the ball fly up forever HELP PLZ I'm Stupid. I did try different blocks but it didn't work.

can it go up a little then come back down. I will keep trying.

he needs help with making gravity.

Yes, that thing!!!!

Try a search in the community for gravity
Taifun

k. thanks. will try.

You need a Clock Timer that will have code to reduce the upwards speed of your Sprite each time it fires.

How are you moving your Sprite?

  • Speed and Direction settings, or
  • Adding global variables dx and dy to Sprite.X and Sprite.Y while changing the dx and dy values?

Can you further elaborate please. I don't really understand coding too well yet. So can you use simple words that a person with 3 days of coding experience can understand please (if possible).

Start with Chapter 17 of
http://www.appinventor.org/bookChapters/chapter17.pdf
from
http://www.appinventor.org/book2

Maybe do some tutorials while you are in there.

Ok that was super helpful! but do you know how to make the ball move down unless it is touching a sprite, this way the ball is not flying.

this is what I have.

To make the ball move by itself you need two global variables (call them speedX and speedY), initially 0. Also pull in a Clock Timer from the Sensors Drawer, and have in its Timer event:

set Ball1.X to Ball1.X + speedX
set Ball1.Y to Ball1.Y + speedY
set speedY to speedY + 1 (to add gravity, a speedup downwards over time)

This makes the Ball keep going.

In the Button Click events, change speedX and speedY instead of Ball1.X and Ball1.Y

To stop the Ball when it hits (Collided event) something, set speedX to 0, likewise speedY to 0.

I can't seem to find "speed x". is it in the designer menu or in the blocks menu.

wen I search for it, it just shows "ball x"

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

k. i'll try.

OK so I talked to my friend and he helped me, but now the character sprite fads threw the ground when you move it left and right. hears the gravity.