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

#1 2011-03-07 04:47:12

cjp3
New Scratcher
Registered: 2011-03-07
Posts: 1

How to make a sprite jump and float down with gravity

Hi

I am trying to work out to do the following things
1. how to make my sprite jump when I push a key (space) so it can go a certain hight it will float back down to the bottom edge or a stage/sprite that is acting as a stage.

2. when my sprite jumps it jumps up and touches another sprite above it and eats or makes that sprite disappears

Offline

 

#2 2011-03-07 04:59:16

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: How to make a sprite jump and float down with gravity

I've got a couple of galleries with example and tutorial projects that might help you out with the jumping. 

Gravity and Jumping

Platform Games

As for the "eating" of other sprites, you can use a script like this

[blocks]
<when green flag clicked>
<show>
<wait until><touching[ Main Character ]
<hide>

[/blocks]

on each of your sprites that might come in contact with your main character sprite.  If your main character is supposed to show an animation of eating or something, have a broadcast message in there to tell it to do so.   Hope that helps.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2011-03-07 08:57:02

SpaceManMike
Scratcher
Registered: 2008-02-09
Posts: 100+

Re: How to make a sprite jump and float down with gravity

Paddle2See wrote:

I've got a couple of galleries with example and tutorial projects that might help you out with the jumping. 

Gravity and Jumping

Platform Games

As for the "eating" of other sprites, you can use a script like this

[blocks]
<when green flag clicked>
<show>
<wait until><touching[ Main Character ]
<hide>

[/blocks]

on each of your sprites that might come in contact with your main character sprite.  If your main character is supposed to show an animation of eating or something, have a broadcast message in there to tell it to do so.   Hope that helps.

or check out http://scratch.mit.edu/projects/SpaceManMike/1440292


http://26.media.tumblr.com/tumblr_lvdp6tYTlp1qkvzkho1_500.png

Offline

 

#4 2011-03-07 09:03:31

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: How to make a sprite jump and float down with gravity

You can check out the Scratch Wiki article on Velocity heresmile

Offline

 

#5 2011-03-12 19:46:44

progJu
Scratcher
Registered: 2011-03-12
Posts: 4

Re: How to make a sprite jump and float down with gravity

Doesn't anyone have a clue of how to jump and float down with gravity?????
I'm getting all the Scratch code I can get but it doesn't work. Anyone with more code?

Offline

 

#6 2011-03-12 19:54:09

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: How to make a sprite jump and float down with gravity

Could you please post the project your having trouble with, progJu


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#7 2011-03-13 19:19:13

progJu
Scratcher
Registered: 2011-03-12
Posts: 4

Re: How to make a sprite jump and float down with gravity

my game is in the newest projects.

Offline

 

#8 2011-03-13 20:37:05

progJu
Scratcher
Registered: 2011-03-12
Posts: 4

Re: How to make a sprite jump and float down with gravity

added to the last message I made: http://scratch.mit.edu/projects/progJu/1654662
(the project I'm having trouble with).

Offline

 

#9 2011-04-08 17:51:52

progJu
Scratcher
Registered: 2011-03-12
Posts: 4

Re: How to make a sprite jump and float down with gravity

I already made my own kind of Scratch gravity. The program is actually very simple.

Offline

 

#10 2011-04-19 20:58:46

pgcyclones
Scratcher
Registered: 2011-04-19
Posts: 1

Re: How to make a sprite jump and float down with gravity

how to eat a fish or sprite 2 and go away

Offline

 

Board footer