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

#1 2012-09-07 07:58:52

frenchdolphin
New Scratcher
Registered: 2012-09-06
Posts: 2

Jumping

How would you make a character jump in a Scratch game?

Offline

 

#2 2012-09-07 10:18:02

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Jumping

This should go in help with scripts, but you do this:

when I receive [jump v]
repeat (10)
change y by [2]
end
repeat (10)
change y by [-2]
end


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#3 2012-09-07 10:29:34

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Jumping

Try This wiki article for more information.

Offline

 

#4 2012-09-07 16:42:14

frenchdolphin
New Scratcher
Registered: 2012-09-06
Posts: 2

Re: Jumping

Thanks, Jvvg. Also, how do you hide a sprite?

Offline

 

#5 2012-09-07 16:43:38

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

Re: Jumping

You use the hide block under the "looks" category.

hide


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

Offline

 

#6 2012-09-08 10:17:55

legobob23o
Scratcher
Registered: 2012-06-22
Posts: 500+

Re: Jumping

jvvg wrote:

This should go in help with scripts, but you do this:

when I receive [jump v]
repeat (10)
change y by [2]
end
repeat (10)
change y by [-2]
end

To have it go more smoothly, do this:

when I receive [jump v]
if <touching [Ground v]?>
  set [Count v] to [0]
  set [YVEL v] to [6]
  change y by (YVel)
end
Now you saw the "Count" variable didn't you? Watch this video for more information.

Offline

 

#7 2012-09-08 10:20:44

legobob23o
Scratcher
Registered: 2012-06-22
Posts: 500+

Re: Jumping

frenchdolphin wrote:

Thanks, Jvvg. Also, how do you hide a sprite?

This would be in another topic.

Offline

 

Board footer