How to make 'bouncing' in hopscotch

hopscotch
tutorial
help
howtos
helpwithcode

#1

what's happening is Just an easy guide on how to make bouncing in hopscotch!
what we are going to make: https://c.gethopscotch.com/p/xqx87ckc3

Step 1

Set up your project like this:

Step 2

create a new rule (when play button is tapped), make a variable called gravity and enter the following code:


The repeat forever is making the ball go down and down...
feel free to play around with the -1!

Step 3

now enter the following code:


When the value goes to 25 the ball moves up by 25, making is seem like it's 'bouncing'!
again, feel free to mess around with the value

Step 4

this is optional but fun:


you can now drag the ball around!

Step 5

now we need it to bounce off the bottom of the screen:


Same as the above code, but bounces off the edge of the screen!

Step 6

Test it out!


https://c.gethopscotch.com/p/xqx87ckc3

Step 7

Give credit to the person who taught you this (me!) :stuck_out_tongue_closed_eyes:

Was this good?

  • This is epic! Potato is extremely happy!
  • this is good! Potato is happy
  • meh
  • bad
  • NOOOO, THIS IS SOOO BAD! POTATO IS DEEP FRIED!

0voters

(design credit to @AHappyCoder)


Jumping/Flying physics
Official Summer Contest Results 2017
#2

Finished it! YAAY!


#3

Soooo...
what do you guys think?


#4

Can you plz make a super complex verion, where the higher it originally is the higher it bounces!


#5

I'm not THAT advanced...
@Stampys_fans


#6

Boowho!


#7

:frowning: come on...
figure that out for urself, @Stampys_fans


#8

Boowho!


#9

Can you have a tutorial with angles? I can help you with it (if you need it :smile:)


#10

AHHH I'M NOT THAT ADVANCED


#11

Okay, sin and cos, ^ or jow to do a VERY detaiked and advanced, non-glichy explosion!


#12

You have copied my design!


#13

:sweat:
i'll credit u


#14

It's okay!!!!


#15

I just liked the design...


#16

And u don't have to if u didn't see my Platform game tutorial!


#17

Thanks!


#18

Okay, I will make the tutorial.

Step 1

Set up the project as @crazygoat did it

Step 2

Set the angle to 90, and then make the following code:


(this is similar to @crazygoat's code again, because this is very similar to it)

Step 3

Do @crazygoat's step 3. Don't worry if the code is slightly different, it will work the same.

Step 4

Add the following:


(this allows you to control the angle)

Step 5

Make the following code:

Platform:

Down button:
(at this point I clicked the Post button and was like "Nooooooooooo")


(EDIT: Do When arrow is pressed, not iPad)
Blank text:

Up button:
(same as down button except increase value by 1 instead of -1)

Step 6

Do step 3 except do When Circle bumps Edge of Screen
Then add a "Set Angle to -90 - Platform rotation for the Circle bumps Platform and Circle bumps Edge of Screen

Step 7

Do a "When iPad is Pressed" for the circle and the platform and do "Move to my finger"

Step 8

You're done!


#19

I don't really get that...


#20

I edited it now, it was unfinished before