So I am making this project http://scratch.mit.edu/projects/rabbit1131/1763732 without the terrain generator so it can scroll. But my problem is, I haven't the slightest Idea how! Help would be much appreciated!
Offline
make individual sprites for the terrain and make a script for each
<when green flag clicked>
<forever>
<go to x (( <{ scroll x }> <+> 462 times number of terrains before the sprite )) )y
0
<if><( <x position> <=> 462 or -462 )>
<hide>
put this script in every terrain sprite. Then make a script like this to make the player move the scroll terrain.
<when green flag clicked>
<forever>
<if><key[ right arrow ]pressed?>
<change{ scroll }by( -3
<if><key[ left arrow ]pressed?>
<change{ scroll }by( 3
that makes the sprite terrain scroll in the right order when the left and right arrow keys are pressed.
Hope this helped.
If you don't understand or need anymore help then tell me and i'll try to help some more.
Offline
cowman2 wrote:
make individual sprites for the terrain and make a script for each
<when green flag clicked>
<forever>
<go to x(( <{ scroll x }> <+> 462 times number of terrains before the sprite )) )y
0
<if><( <x position> <=> 462 or -462 )>
<hide>
put this script in every terrain sprite. Then make a script like this to make the player move the scroll terrain.
<when green flag clicked>
<forever>
<if><key[ right arrow ]pressed?>
<change{ scroll }by( -3
<if><key[ left arrow ]pressed?>
<change{ scroll }by( 3
that makes the sprite terrain scroll in the right order when the left and right arrow keys are pressed.
Hope this helped.
If you don't understand or need anymore help then tell me and i'll try to help some more.
I'll try that! Thanks much
Offline