How do you scroll with backgrounds?
Offline
Well, Archmage has a whole thread, but what the heck. I'll try. First, make variable ScrollX
This on background with:
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[right arrow ]pressed?>[/blocks]
[blocks]<change{ scrollx }by(-5[/blocks]
blocks]<when green flag clicked>[/blocks]
[blocks]<forever if><key[left arrow ]pressed?>[/blocks]
[blocks]<change{ scrollx }by(5[/blocks]
And on Sprite Zero (Name it that):
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<set x to((( <{scroll }> <+>(( 480 <*> 0 )) ))[/blocks]
And for ever other background sprite, multiply 480 by 1 bigger number. For Example:
Above is sprite Zero, this is sprite One:
blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<set x to((( <{scroll }> <+>(( 480 <*> 1 )) ))[/blocks]

Offline
Visit the scrolling thread @ http://scratch.mit.edu/forums/viewtopic.php?id=2440
Offline