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

#1 2011-09-17 22:48:05

technomaniac
Scratcher
Registered: 2011-08-15
Posts: 94

Scrolling

I know that there are maybe a thousand tutorials on scrolling in Scratch, but the world DEFINITELY needs another. I'm not asking for huge codes to copy, but just the basics that scrolling runs on. I am currently viewing a scrolling tutorial, and I just need a generator for scrolling.

Offline

 

#2 2011-09-17 23:12:56

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Scrolling

Make a background that says:
go to xscroll+480*# starting with 0 then 1, 2 etc.
and on the character right arrow pressed, change xscroll by -10 and opposite for left.

Offline

 

#3 2011-09-17 23:53:13

technomaniac
Scratcher
Registered: 2011-08-15
Posts: 94

Re: Scrolling

Imagination wrote:

Make a background that says:
go to scrollx+480*# starting with 0 then 1, 2 etc.
and on the character right arrow pressed, change scrollx by -10 and opposite for left.

But how do you make scrollx work?

Offline

 

#4 2011-09-18 01:26:43

my-chemical-romance
Scratcher
Registered: 2011-04-24
Posts: 1000+

Re: Scrolling

First, make a variable called "X", next do "set X position to "X"" on the terrain or model. Now on the character do "when "left arrow" pressed change "X" by -4" the point is that the character doesn't move at all, the world moves around him.

to make models that come on later do "if X<50 AND X>100 show" etc, also do a +xx for something that comes later eg "set X position to "X"+100"

Offline

 

Board footer