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

#1 2011-03-25 12:34:56

Earthboundjeff
Scratcher
Registered: 2010-09-28
Posts: 1000+

Help me!

Whenever I make a platformer, I have trouble with jumping. My character never is affected by gravity! I tried many different methods, but I eventually had to release...this.
http://scratch.mit.edu/projects/Earthboundjeff/1571090

Last edited by Earthboundjeff (2011-03-28 14:15:37)


https://encrypted-tbn0.google.com/images?q=tbn:ANd9GcR1SONrHUmdKZXQNDgtN_vpycOOo-BDMfnlqHZRA1lMpYXhX7Jc

Offline

 

#2 2011-03-25 17:35:40

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: Help me!

I have always found it helpful to go into "import sprite" and choose the gravity marble. All you need to do is modify the scripts and add controls. You could also try using a platform base. http://scratch.mit.edu/projects/JSO/1105685

Offline

 

#3 2011-03-28 14:15:26

Earthboundjeff
Scratcher
Registered: 2010-09-28
Posts: 1000+

Re: Help me!

It's really just that when they jump, they can jump as many times as the button is pressed and they don't go down until you let go of the button.


https://encrypted-tbn0.google.com/images?q=tbn:ANd9GcR1SONrHUmdKZXQNDgtN_vpycOOo-BDMfnlqHZRA1lMpYXhX7Jc

Offline

 

#4 2011-03-28 17:29:45

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Help me!

<when green flag clicked>
<forever if> <key[ Up Arrow ]pressed?>
<change y by( 30 )>
<wait until> <touching[ Ground ]>
<end>


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#5 2011-03-29 10:02:37

IdozenCair
New Scratcher
Registered: 2011-03-29
Posts: 5

Re: Help me!

Well, there's another thing I don't understand about:
In some games, the script contains a variable block named Gravity. How do you make the variable have effect?

Offline

 

#6 2011-03-29 16:28:19

spencertr
Scratcher
Registered: 2011-01-23
Posts: 13

Re: Help me!

LOL I need a project with a URL block!

Offline

 

#7 2011-03-29 16:39:43

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Help me!

Almost foolproof method:
http://i53.tinypic.com/1ygbr.gif


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#8 2011-04-03 07:37:54

IdozenCair
New Scratcher
Registered: 2011-03-29
Posts: 5

Re: Help me!

I don't get it. The variables don't have any effect on the script. It justs shows the number on the stage.

Offline

 

#9 2011-04-03 07:44:55

Clank23
Scratcher
Registered: 2011-03-01
Posts: 1000+

Re: Help me!

You put a forever change y by (varible) and put forever if up arrow pressed change y by somthing then set gravity to -something and change y to gravity.
Hope this helps.  cool


http://img846.imageshack.us/img846/4333/signaturely.png

Offline

 

#10 2011-04-03 08:44:13

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Help me!

Clank23 wrote:

You put a forever change y by (varible)

Whoops, I forgot to add that into my script above.  Right now it does nothing  tongue
I guess it wasn't foolproof.
Here's my script in it's entirety:
http://i53.tinypic.com/jpd09e.gif

Last edited by Kileymeister (2011-04-03 08:47:06)


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer