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

#1 2010-01-24 20:43:25

Scratch_OSX
Scratcher
Registered: 2009-12-05
Posts: 100+

How do I make a scrolling effect for games?

I know it has to do with variables...

cool


--Scratch_OSX

Offline

 

#2 2010-01-24 22:26:48

Dracosphinx
Scratcher
Registered: 2009-11-25
Posts: 4

Re: How do I make a scrolling effect for games?

Make a variable: scrollx is what I'll call it, and make your terrain out out of sprites. Make the first sprite of the terrain have this script: forever set x to scrollx + 480 times 0. Make your second terrain sprite have the same script exept the times 0 at the end should be made into times 1, the third terrain sprite has times two, and so on. Make the right arrow change scrollx by 1 and the left arrow change scrollx by -1. That's a scrolling program.


No signature

Offline

 

#3 2010-01-24 23:20:08

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How do I make a scrolling effect for games?

http://scratch.mit.edu/forums/viewtopic.php?id=2440


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

Board footer