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

#1 2012-03-12 19:33:43

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Vertical Scroller

Hey everyone! I'm working on a rocket game and would like to know how to make a vertical scrolling game.

Do you think you can help me?

Thanks  big_smile


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&link4=http://i.imgur.com/POEpQyZ.png&link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#2 2012-03-12 19:42:56

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Vertical Scroller

you mean scroll y?

when green flag clicked
forever
set y to [scroll y (variable) + {360*(the placement you want, starting with zero)}]
forever end


infinite scroll y?

This will be like a falldown game where the barriers are scrolling downwards

Make about 5 sprites

Make costumes of barriers each one different than the other for each costume

Make a script like so (I don't like scratchblocks)

When green flag clicked
go to x:0 y:180
hide
forever
   wait until [insert variable name here] = (this sprite number)
   switch to costume pick random 1 to (limit of costumes)
   show
   repeat until y = (pick a number between 160 and 140, depending on the usual lengths         
   between costumes)
         change y by -(speed you want)
   repeat end
   set [variable mentioned above] to (next sprite number)
   repeat until y =-170 or y < -170
         change y by -(speed mentioned above)
   repeat end
   hide
forever end

If someone who has more experience with scratchblocks turn this into that, that would be helpful.

Last edited by MaxFlyboy (2012-03-12 19:56:50)


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#3 2012-03-12 19:53:04

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Vertical Scroller

MaxFlyboy wrote:

you mean scroll y?

infinite scroll y?

Scroll y and then I'll make the backgrounds.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&amp;link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&amp;link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#4 2012-03-12 19:57:28

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Vertical Scroller

I edited my post to accommodate both


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#5 2012-03-12 20:20:02

joletole
Scratcher
Registered: 2011-02-20
Posts: 1000+

Re: Vertical Scroller

MaxFlyboy wrote:

you mean scroll y?

when green flag clicked
forever
set y to [scroll y (variable) + {360*(the placement you want, starting with zero)}]
forever end


infinite scroll y?

This will be like a falldown game where the barriers are scrolling downwards

Make about 5 sprites

Make costumes of barriers each one different than the other for each costume

Make a script like so (I don't like scratchblocks)

when gf clicked
go to x:(0) y:(180)
hide
forever
   wait until [insert variable name here] = (this sprite number)
   switch to costume (pick random (1) to (limit of costumes)
   show
   repeat until y = (pick a number between 160 and 140, depending on the usual) 
         change y by -(speed you want)
   repeat 
end
   set [variable mentioned above] to (next sprite number)
   repeat until y =(170) or y < (170)
         change y by -(speed mentioned above)
   repeat end
   hide
forever end
If someone who has more experience with scratchblocks turn this into that, that would be helpful.

Think I fixed it.

Offline

 

#6 2012-03-12 20:29:03

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Vertical Scroller

Not completely

and editing the script because their is a mistake

When green flag clicked
hide
forever
   go to x:0 y:180
   wait until [insert variable name here] = (this sprite number)
   switch to costume pick random 1 to (limit of costumes)
   show
   repeat until y = (pick a number between 160 and 140, depending on the usual lengths         
   between costumes)
         change y by -(speed you want)
   repeat end
   set [variable mentioned above] to (next sprite number)
   repeat until y =-170 or y < -170
         change y by -(speed mentioned above)
   repeat end
   hide
forever end

Last edited by MaxFlyboy (2012-03-12 20:29:20)


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#7 2012-03-12 21:04:48

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Vertical Scroller

I actually want a script that makes it go up  tongue


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&amp;link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&amp;link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#8 2012-03-12 21:16:42

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Vertical Scroller

be more specific, there are countless ways to do this


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#9 2012-03-12 21:18:16

a1130
Scratcher
Registered: 2009-08-27
Posts: 500+

Re: Vertical Scroller

joletole wrote:

MaxFlyboy wrote:

you mean scroll y?

when green flag clicked
forever
set y to [scroll y (variable) + {360*(the placement you want, starting with zero)}]
forever end


infinite scroll y?

This will be like a falldown game where the barriers are scrolling downwards

Make about 5 sprites

Make costumes of barriers each one different than the other for each costume

Make a script like so (I don't like scratchblocks)

when gf clicked
go to x:(0) y:(180)
hide
forever
   wait until <[insert variable name here] = (this sprite number)>
   switch to costume [pick random (1) to (limit of costumes v]
   show
   repeat until <y = (pick a number between 160 and 140, depending on the usual)> 
         change y by (-speed you want)
   end
   set [variable mentioned above] to (next sprite number)
   repeat until <<(y) =(170)> or <(y) < (170)>>
         change y by (-speed mentioned above)
   end
   hide
If someone who has more experience with scratchblocks turn this into that, that would be helpful.

Think I fixed it.

Helped fix it more  smile
Edit: fixed it even more.

Last edited by a1130 (2012-03-12 21:42:58)

Offline

 

#10 2012-03-12 21:18:36

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Vertical Scroller

I want to make a rocket which you move by clicking and it goes towards your mouse. I already did the clicking part. Now, I want to make it so the sky scrolls up as you get higher.

Is this possible?

Thanks,
JJROCKER


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&amp;link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&amp;link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

#11 2012-03-12 21:27:55

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Vertical Scroller

Yes,

do the normal scroll y thing for the background sprites

For the rocket, have it scroll upwards to the click and then plug this script in

repeat until <<<y position> = (-160)> or <<y position> < (-160)>>
change [scroll y v] by (-5)
change y by (-5)
end
So, the rocket will go the click, then it will start to scroll downwards to show the rest of the sprites

Last edited by MaxFlyboy (2012-03-12 21:28:44)


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#12 2012-03-13 22:40:01

JJROCKER
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Vertical Scroller

I'm still confused


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://img255.imageshack.us/img255/3491/signature1y.jpg&amp;link2=http://img577.imageshack.us/img577/5272/signature1sx.jpg&amp;link3=http://img4.imageshack.us/img4/8514/signature1et.jpg&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://img163.imageshack.us/img163/4640/jjrockerfinal.jpg

Offline

 

Board footer