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

#1 2008-05-26 10:17:28

zachandrew0123
Scratcher
Registered: 2008-02-28
Posts: 500+

How to Scroll using only 2 terrains

Tired of adding all of those needless blocks? Tired of adding all of those needless sprites?
Well it is possible to scroll using only 2 terrains

Your character can move by scrollx

Terrain1

It is important to name this sprite terrain1
<when green flag clicked>
<set x to( scrollx*480+0 )
<forever if>sprite1(main character that walks) touches terrain2
<set x to( scrollx*480+1 )
and keep on continueing this method but changing the second #from the scrollx word

Terrain2
It is important  to name this sprite terrain2
all you have to do is the same thing as Terrain1 but instead of the when touches terrain2 you make it terrain1

JUST PUT IN A CHANGE COSTUME SCRPIT IN THERE TO CHANGE THE LOOK OF THE SPRITE

RIGHT OW THERE IS A GLITCH, GIVE ME A FEW SECONDS TO GET RID OF THE GLITCH  (THIS MAY TAKE UP TO 20 MINUTES, PLZ BE PATIENT )

I DID NOT TEST THIS OUT YET
HOWEVER I AM SURE THAT IT WILL WORK

Last edited by zachandrew0123 (2008-05-26 10:31:53)

Offline

 

#2 2008-05-26 11:49:16

Bobby500
Scratcher
Registered: 2008-04-19
Posts: 1000+

Re: How to Scroll using only 2 terrains

Yeah, I saw that in dingdongs game. It should work.

Offline

 

#3 2008-05-26 19:09:07

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

Re: How to Scroll using only 2 terrains

I can tell from the way this looks now that it may not work. I have already made a tutorial on how to scroll with 2 sprites and the tutorial can be located @ http://scratch.mit.edu/forums/viewtopic.php?id=2440

Also, if this did work, because the terrain sprites use an "if touching sprite" block projects made with this will not be able to have terrain sprites with blank spots in them which forces the programmer to use colour sensing for his hero sprite.


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