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

#1 2010-10-30 09:55:31

bdn7
Scratcher
Registered: 2010-07-10
Posts: 100+

How do you make a y and x scroller?

How do you make a scroller where both y and x move? I tried it and the the velocity and positioning worked, but some platforms were showing, even when scroll x or scroll y didn't equal there position. Please help!


http://i.imgur.com/Q7PiV.png
That's right. My text is BLUE.

Offline

 

#2 2010-10-30 10:00:13

poopo
Scratcher
Registered: 2009-09-20
Posts: 1000+

Re: How do you make a y and x scroller?

I think this is more of a all about scratch;)


http://i45.tinypic.com/28rnqki.jpg

Offline

 

#3 2010-10-30 12:34:09

vortex19
Scratcher
Registered: 2009-06-03
Posts: 100+

Re: How do you make a y and x scroller?

http://scratch.mit.edu/projects/vortex19/704112
Basically you make a scroll-x and a scroll-y variable. If you know how to make a simple scroller game (something along the lines of Mario or Sonic), then you can apply that to the y-axis as well as the x-axis. Otherwise, there's a lot of tutorials (i think archmage has some) on how to do 4-way scrolling.

Offline

 

#4 2010-10-30 19:39:53

bdn7
Scratcher
Registered: 2010-07-10
Posts: 100+

Re: How do you make a y and x scroller?

vortex19 wrote:

http://scratch.mit.edu/projects/vortex19/704112
Basically you make a scroll-x and a scroll-y variable. If you know how to make a simple scroller game (something along the lines of Mario or Sonic), then you can apply that to the y-axis as well as the x-axis. Otherwise, there's a lot of tutorials (i think archmage has some) on how to do 4-way scrolling.

Well, that's what I tried and the positing worked, but when I went up the platforms below me were still showing at the bottom of the screen.


http://i.imgur.com/Q7PiV.png
That's right. My text is BLUE.

Offline

 

#5 2010-10-30 19:48:54

cheddargirl
Scratch Team
Registered: 2008-09-15
Posts: 1000+

Re: How do you make a y and x scroller?

bdn7 wrote:

vortex19 wrote:

http://scratch.mit.edu/projects/vortex19/704112
Basically you make a scroll-x and a scroll-y variable. If you know how to make a simple scroller game (something along the lines of Mario or Sonic), then you can apply that to the y-axis as well as the x-axis. Otherwise, there's a lot of tutorials (i think archmage has some) on how to do 4-way scrolling.

Well, that's what I tried and the positing worked, but when I went up the platforms below me were still showing at the bottom of the screen.

Hmm, it sounds like you encountered one of Scratch's limitations (the inability for sprites to go fully offscreen). You can create a sprite that goes around the sides of the stage and continually stays in the front to ensure that the platforms are not shown. (You can see this example in my four-way scroller here. Notice how there's a border that goes on all sides around the stage when the gameplay is started).


http://i.imgur.com/8QRYx.png
Everything is better when you add a little cheddar, because when you have cheese your life is at ease  smile

Offline

 

#6 2010-10-30 23:05:51

bdn7
Scratcher
Registered: 2010-07-10
Posts: 100+

Re: How do you make a y and x scroller?

cheddargirl wrote:

bdn7 wrote:

vortex19 wrote:

http://scratch.mit.edu/projects/vortex19/704112
Basically you make a scroll-x and a scroll-y variable. If you know how to make a simple scroller game (something along the lines of Mario or Sonic), then you can apply that to the y-axis as well as the x-axis. Otherwise, there's a lot of tutorials (i think archmage has some) on how to do 4-way scrolling.

Well, that's what I tried and the positing worked, but when I went up the platforms below me were still showing at the bottom of the screen.

Hmm, it sounds like you encountered one of Scratch's limitations (the inability for sprites to go fully offscreen). You can create a sprite that goes around the sides of the stage and continually stays in the front to ensure that the platforms are not shown. (You can see this example in my four-way scroller here. Notice how there's a border that goes on all sides around the stage when the gameplay is started).

I see how that works. Thanks!


http://i.imgur.com/Q7PiV.png
That's right. My text is BLUE.

Offline

 

Board footer