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

#1 2008-05-06 23:26:48

cheezleweezle
Scratcher
Registered: 2008-05-06
Posts: 2

Vertical Scrolling

well there seems to be a lot about horizontal scrolling
but not much on vertical scrolling backgrounds
so im trying to make a game similar to 1945 but i cant get a vertical scrolling background to work

so far, i would like to use 5 or so sprites to make the background
I tried converting a horizontal scroller to a vertical one (using the idea above) but it didnt work out too well

so can anyone tell me how to do it this way?
examples are fine too

-thanks in advance

Offline

 

#2 2008-05-06 23:30:45

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Vertical Scrolling

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[ up arrow ]pressed?>[/blocks]
[blocks]<change{scrolly  }by( -5>[/blocks]


As for sprites:


[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
<set y to( ((<{scrollY  }>  <+> (( 360 <*> 1 )) ))[/blocks]




And so on...

Last edited by Bluestribute (2008-05-06 23:31:38)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#3 2008-05-06 23:40:34

cheezleweezle
Scratcher
Registered: 2008-05-06
Posts: 2

Re: Vertical Scrolling

yeah i got that but if i have like 5 sprites
when and where to i show the next one?

Offline

 

#4 2008-05-06 23:53:48

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Vertical Scrolling

Just use the second script, but change the 1 to: 0, 1, 2, 3, 4, and 5 on different sprites, and when scrollY gets to a certain number, set it to 0

Last edited by Bluestribute (2008-05-06 23:54:08)


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#5 2008-05-07 12:04:18

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: Vertical Scrolling

I started a vertical scroller that you may be able to get ideas from or add to.  Have a look at RedBaron and see if that is helpful to you.  Please feel free to use as desired.

http://scratch.mit.edu/projects/EdnaC/116094

-MrEd

Last edited by EdnaC (2008-05-07 12:04:57)

Offline

 

#6 2008-05-08 20:32:05

Sacrifice4u
Scratcher
Registered: 2008-03-11
Posts: 4

Re: Vertical Scrolling

There are plenty of exaples of vertical scrolling if you search the site. but heres an example of 4 way scrolling tht includes a scrolly variable http://scratch.mit.edu/projects/Sacrifice4u/157124

Last edited by Sacrifice4u (2008-05-08 20:33:08)

Offline

 

Board footer