I have trobule making a scrolling game... Can anybody help please?
This is the script for the player sprite:
<when green flag clicked>
<set{ yvelocity }to( 0
<go to x -213 )y 0
<forever>
<change y by( <{ yvelocity }>
<if><key[ right arrow ]pressed?>
<if><( <x position> <=> -1 )>
<if><( <{ Scrollx }> <>> -480 )>
<change{ Scrollx }by( -3
<end>
<else>
<change x by( 3
<end>
<if><key[ left arrow ]pressed?>
<if><( <x position> <=> -1 )>
<if><( <{ Scrollx }> <<> 0 )>
<change{ Scrollx }by( 3
<end>
<else>
<change x by( -3
<end>
<change{ yvelocity }by( -1
<end>
The sidescrolling never occurs if the player sprite's X position is 0. Can somebody please find a solution to this problem, please?
Offline
Is there any chance you could post the current project online and tell me the URL. Also if you give me an idea of what type of game you wish to make and I might be able to help.
Eureka!!!! It's obvisous. You have put if (( X-position ) = -1 ), it needs to be
(( X-position ) = 0 )
Last edited by tro95 (2008-07-10 06:53:05)
Offline