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

#1 2008-08-11 00:16:47

theshapeshifterage
Scratcher
Registered: 2008-08-04
Posts: 100+

How to Scroll........MY WAY!!

ok 2 sprite scrolling was way confusing for me so i am trying to come up with a less complicated version

I DID NOT TEST THIS OUT YET!!!

below is my "attempt" and i think it sems extremely simple

well in every scrolling game you need a variable called scrollx demonstrated below
<{ scrollx }>

ok simple
now you make these blockson your character sprite (movement)
<when green flag clicked>
<set{ scrollx }to( 0
<forever>
<if><key[ right ]pressed?><change{ scrollx }by( -5
<if><key[ left ]pressed?><change{ scrollx }by( 5

easy i am sure all of the parts so far are good. now comes the untested part...and kinda the main part

make a sprite named terrain 1

on this sprite put the blocks shown below

<when green flag clicked>
<forever>
<if><( <{ scrollx }> <<>what ever you choose  )>
<if><( <{ scrollx }> <<>what ever you choose  )>
<if><( <{ scrollx }> <<>what ever you choose  )>
<if><( <{ scrollx }> <<>what ever you choose  )>
<if><( <{ scrollx }> <<>what ever you choose  )>

you choose where,it is hard to explain, sorry if you do not understand me, i will make a project about this soon.
have the costume change to the updated costume if scrollx = less whatever you choose

yes even i am confusing my self which means this may not work and i would have wasted my time testing and making this

do that for the second sprite as well and they should scroll.....i do not think i did a very good job so let me make a project which tests it out
i will do that A.S.A.P!!!

if you are 100% sure you think this will work and understand then test it yourself, but if i have to...eeeeer i WILL test it out so do not worry
i will tell you if it works

Offline

 

#2 2008-08-11 01:59:02

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

Re: How to Scroll........MY WAY!!

This isn't a very good tutorial.  I can't understand what you are trying to explain. Perhaps you can explain in greater detail?


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

 

#3 2008-08-11 17:24:56

theshapeshifterage
Scratcher
Registered: 2008-08-04
Posts: 100+

Re: How to Scroll........MY WAY!!

archmage wrote:

This isn't a very good tutorial.  I can't understand what you are trying to explain. Perhaps you can explain in greater detail?

that is what i mean, im not a very good explainer so i will make a project soon

Offline

 

Board footer