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

#1 2010-12-20 18:00:43

TGKookie
Scratcher
Registered: 2010-12-03
Posts: 29

Scroll

I want to make a game where you use the arrow keys but I want a scrolling background while my character moves CAN YOU HELP???????? PLEASE!!!!!

Offline

 

#2 2010-12-20 18:29:15

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Scroll

You'll need this script in the background sprites:
http://i52.tinypic.com/23wpr8k.gif

Basically the bigger your scrolling screen, the more sprites you'll need with this script.  ScrollX and ScrollY should be for all sprites, XPos and YPos for the sprite only.  In the starting blocks, change the [set XPos to (0)] to whatever place it should be.  The further right it should be, the higher the [set XPos to (number)] should be.  The further left it should be lower.  Same for YPos.

For the last bit, the if/else, that's just to make sure it doesn't show when it's on the sides and corners and stuff.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

#3 2010-12-20 18:34:18

TGKookie
Scratcher
Registered: 2010-12-03
Posts: 29

Re: Scroll

What about things that appear on-screen while scrolling how many background sprites do i need?

Offline

 

#4 2010-12-20 18:41:04

Kileymeister
Scratcher
Registered: 2008-04-17
Posts: 1000+

Re: Scroll

TGKookie wrote:

What about things that appear on-screen while scrolling how many background sprites do i need?

Use the same script for the objects that appear on screen.

The number of background sprites depends on how big the level is, unless you look into infinite scrolling sprites, which only requires two.  However I'm too lazy to put up the script for that, you can look it up with the search bar in the top right.


I'm back, and showcasing two new* projects!  Click left or right on the image below to see!
http://img109.imageshack.us/img109/7905/part1l.pnghttp://img859.imageshack.us/img859/6417/part2bf.png

Offline

 

Board footer