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

#1 2012-08-11 14:13:40

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

scrolling forever

I'm making a stickman game that involves a stickman jumping from hill to for as long as he can. The hills use the scrolling function. The hills automatically scroll just like temple run where it never stops scrolling across the screen. That's what I want is for the hills to reach the edge then reset themselves and then scroll across the screen again. And repeat this forever. I don't know how to have the hills reset themselves and continue scrolling. Any help?


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#2 2012-08-11 15:00:44

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: scrolling forever

This is very simple, but you could try using these scripts. Just keep in mind that these scripts will make the hills scroll from right to left. Just tell me if you want something different.

This is for your first hill. Remember to make it 480 pixels long:

when gf clicked
go to x: (-240) y: (0)
glide (1.5) secs to x: (-480) y: (0)
forever
 go to x: (480) y: (0)
 glide (6) secs to x: (-480) y: (0)
This is for your second hill. Rememeber to make it 480 pixels long.

when gf clicked
go to x: (240) y: (0)
glide (4.5) secs to x: (-480) y: (0)
forever
 go to x: (480) y: (0)
 glide (6) secs to x: (-480) y: (0)
From here, you could make multiple costumes for the hills and make the hills pick a random costume so that your never keep on running over the same hills over and over again.

Anyway, I hope that this is what your looking for!

Last edited by ErnieParke (2012-08-12 09:03:05)


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2012-08-11 22:39:18

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: scrolling forever

^^^
That actually isnt how good scrolling works im afraid. I think hes looking for variable scrolling (i.e. based on X-scroll).

Although this is overcomplicated you might find this useful. It uses infinite scrolling.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#4 2012-08-11 22:50:37

daniel_j
Scratcher
Registered: 2012-05-22
Posts: 100+

Re: scrolling forever

Wes64 wrote:

^^^
That actually isnt how good scrolling works im afraid. I think hes looking for variable scrolling (i.e. based on X-scroll).

Although this is overcomplicated you might find this useful. It uses infinite scrolling.

There goes Wes with his overcomplicated scripts xD
But, that is actually a good way to do it  smile


http://i50.tinypic.com/2dhgnsx.jpg

Offline

 

#5 2012-08-12 20:13:13

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: scrolling forever

Thanks guys.


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

Board footer