Hey guys i wan't to make scrolling game, well like it any way... i don't know how to make scrolling thing. i was wondering if any of u could help, tell me how to do it, or website of youtube, but i check most of it. And there were all [removed by moderator]. Please tell me how to.
Last edited by cheddargirl (2010-09-23 13:55:29)
Offline
Its complicated: You have to make a variable named scrollx or somthing like that not too comfusing then make when the caracter your controlling when left arrow
<change{scrollx}by(5
when right arrow pressed <change{scrollx}by(-5
then make a sprite for the ground peices make it the longest you can and put <when green flag clicked> <forever> <set x to( (( scrollx <+> (( 480 <*>0 )) )) the next peice of ground will have to be the same only instead of the 0 (not instead of the 480) put a 1. The next peice of land will be whith a 2 next 3 ext.
Offline
shadownn wrote:
Hey guys i wan't to make scrolling game, well like it any way... i don't know how to make scrolling thing. i was wondering if any of u could help, tell me how to do it, or website of youtube, but i check most of it. And there were all [removed by moderator]. Please tell me how to.
it's pretty easy
you need a make a variable (call it whatever you want but most call it scroll x)
now the width of the scratch screen is 480 (-240 to 240 in x)
so the code would be:
{when green flag clicked}
{set scroll x to (0)}
{forever
{set x to (scrollx)+(480)
this will make it so you can move left and right, but if you want to make more platforms you need to change the code to
{when green flag clicked}
{set scroll x to (0)}
{forever}
{set x to (scroll x)+(480)*(what position that platform will be (0 1 -1 -2 ect) )
{/forever}
and just have the left and right arrow keys change scroll x.
Offline