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

#1 2010-06-30 20:53:42

mariogamer177
Scratcher
Registered: 2010-06-29
Posts: 6

how do i make my character jump and make the screen scroll

ok so i got him to move left and right but the problem with that is whenever i have him walk left he walks backwards! and another thing i cant get the screen to move, and i cant make him jump! what do i do?

Offline

 

#2 2010-06-30 21:07:04

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: how do i make my character jump and make the screen scroll

here:

first make a variable called 'scrollY'

then make a script like this:

[blocks]<set{ scrollY }to( 0
<forever>
<if><key[ up arrow ]pressed?>
<repeat( 5
<change{ scrollY }by( 2
<end>
<repeat( 5
<change{ scrollY }by( -2
<end>
<end>[/blocks]

and then for the terrain sprite:

[blocks]<forever>
<set y to( (( 0 <-> <{ scrollY }> ))
<end>[/blocks]

and that's it.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

Board footer