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

#1 2010-12-26 23:38:09

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Scrolling help

I'm working on a new racing game. The race car itself will not actually move up and down; the road will. The road will move down at the speed of the car. I tried having two road sprites that would constantly follow each other (they would be linked together by the ends, moving downwards). It's not working, and I can't figure out what to do.

Can anyone help me?


Thanks,

Silvershine

Offline

 

#2 2010-12-26 23:41:41

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Scrolling help

Sure!  I will see what i can do  wink


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#3 2010-12-26 23:56:46

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Scrolling help

heres a very glitchy way of doing it http://scratch.mit.edu/projects/ssss/1503287


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#4 2010-12-27 00:04:37

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Scrolling help

Now i have fixed it to a pretty good degree http://scratch.mit.edu/projects/ssss/1503291

Now this is the best one so far http://scratch.mit.edu/projects/ssss/1503302

Last edited by ssss (2010-12-27 00:15:48)


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#5 2010-12-27 01:24:49

XplodingEggs
Scratcher
Registered: 2009-12-09
Posts: 100+

Re: Scrolling help

Okay, if you want to have a limited number of sprites for scrolling, you will need to have at least three for it to work. What will happen, is that all the sprites will have their own variable called "offset" and whenever the screen passes that sprite, it will increase the offset, which you add to your scrolling variable to go forward. However, if you also need to go backwards, you will need to also have a script for to lower offset, which you could check by looking at your scrolling variable + offset.
Hope this helps!  wink


http://i54.tinypic.com/102kqr7.jpg

Offline

 

#6 2010-12-27 01:26:21

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Scrolling help

XplodingEggs wrote:

Okay, if you want to have a limited number of sprites for scrolling, you will need to have at least three for it to work. What will happen, is that all the sprites will have their own variable called "offset" and whenever the screen passes that sprite, it will increase the offset, which you add to your scrolling variable to go forward. However, if you also need to go backwards, you will need to also have a script for to lower offset, which you could check by looking at your scrolling variable + offset.
Hope this helps!  wink

Is the forward one what mine does?


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#7 2010-12-27 01:37:23

deatheater
Scratcher
Registered: 2008-04-11
Posts: 1000+

Re: Scrolling help

or, if you want something easier

project

that's how you make a sprite bigger than the screen (so only one sprite is scrolling)

Last edited by deatheater (2010-12-27 01:37:51)

Offline

 

#8 2010-12-27 10:56:30

silvershine
Scratcher
Registered: 2010-11-21
Posts: 500+

Re: Scrolling help

Thanks for your help everyone! I fixed the problem.  big_smile

Offline

 

#9 2010-12-27 11:13:08

XplodingEggs
Scratcher
Registered: 2009-12-09
Posts: 100+

Re: Scrolling help

silvershine wrote:

Thanks for your help everyone! I fixed the problem.  big_smile

Okay, great!  big_smile


http://i54.tinypic.com/102kqr7.jpg

Offline

 

#10 2010-12-27 16:28:44

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Scrolling help

silvershine wrote:

Thanks for your help everyone! I fixed the problem.  big_smile

Was mine helpful?


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

#11 2011-01-09 17:04:48

spike_the_hegehog
Scratcher
Registered: 2010-12-22
Posts: 2

Re: Scrolling help

uhh sry<play sound want want waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Offline

 

Board footer