This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-11-26 06:25:56

Doodle8
New Scratcher
Registered: 2011-11-26
Posts: 3

Jumping!

Hi guys. So I am new to scratch, and I am trying to make my own game. I want it to be inspired by the game Doodle Jump, so I would like my Sprite to be able to jump whenever touching a platform.
Do any of you know how to do that?
Thank you!

Offline

 

#2 2011-11-26 08:32:55

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Jumping!

If touching color (color of platform)
Change y by 20
Change x by 5
Change y by -20

Last edited by SJRCS_011 (2011-11-26 08:33:11)


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#3 2011-11-26 15:39:55

flamekyle
Scratcher
Registered: 2011-03-18
Posts: 1000+

Offline

 

#4 2011-11-30 04:39:05

Doodle8
New Scratcher
Registered: 2011-11-26
Posts: 3

Re: Jumping!

Thank you so much!  smile

Offline

 

#5 2011-11-30 22:28:02

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Jumping!

Did you get it?  big_smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#6 2011-12-27 00:15:26

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Jumping!

The problem with the script above is that you get a boost by going through a platform. You should add y velocity and do this

when touching platform
if y velocity < 0 (saying that the sprite is going down)
set y velocity to (how ever much)
if not y velocity < 0
nothing

Go to the wiki or a different post talking about velocity to learn how to do it


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

Board footer