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

#1 2010-12-21 08:20:25

nnned
New Scratcher
Registered: 2010-11-22
Posts: 6

help, please

How do i get the screen to scroll? and how would i have, say, a monster show up once the screen scrolls over to it?

Offline

 

#2 2010-12-21 08:26:42

The_Dancing_Donut
Scratcher
Registered: 2010-08-03
Posts: 1000+

Re: help, please

If you have the 1.4 version of Scratch, open up the example project ScrollingDemo, and look at the scripts.  smile


Offending strangers since 2010.

Offline

 

#3 2010-12-23 06:47:48

Thenuclearduck
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: help, please

It's easy. Just make a sprite called terrain and a variable called scrollx. then make a script so that the sprite terrain will change it's x coordinate by the variable scrollx. Then make a script so that when the left arrow is pressed, scrollx is set to 1, and if the right arrow is pressed, scrollx is set to -1, and if neither are pressed, it is set to 0.
Hope I helped!


http://blocks.scratchr.org/API.php?user=Thenuclearduck&action=projects&type=newest&return=text&num=1 is my newest project! It has http://blocks.scratchr.org/API.php?user=Thenuclearduck&action=projects&type=newest&return=views&num=1 views!

Offline

 

#4 2010-12-23 06:50:27

Thenuclearduck
Scratcher
Registered: 2010-10-17
Posts: 100+

Re: help, please

or if you want it slightly more complicated, make the terrain forever go to scrollx, make scrollx set to 0 at the start, and then if arrow keys pressed, scrollx is changed by 1 (left) or -1(right). This will help with the monster, you could make it forever go to scrllx + how far along you want it to be. Hope I helped! again.


http://blocks.scratchr.org/API.php?user=Thenuclearduck&action=projects&type=newest&return=text&num=1 is my newest project! It has http://blocks.scratchr.org/API.php?user=Thenuclearduck&action=projects&type=newest&return=views&num=1 views!

Offline

 

#5 2010-12-23 06:51:13

WeirdF
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: help, please

See this Scratch Wiki article on it: Scrolling


http://i.cr3ation.co.uk/dl/s1/gif/847032b8a331def77529b6a0384db1fe_handfingers.gif

Offline

 

Board footer