JorgeLiborinho Posted February 9, 2011 Share Posted February 9, 2011 Uest And doing a simple game, and wrote these following codes: set kernel_options player1colors x=50 y=50 main COLUBK= 2 player1: %01101100 101000 111000 %10111010 %11111110 111000 111000 111000 end player1color: $00 $F4 $F4 $88 $98 $F6 $F6 $F6 end player1x=50 player1y=50 drawscreen if joy1right then x=x+1 if joy1left then x=x-1 if joy1up then y=y-1 if joy1down then y=y+1 goto main I did everything right and do not know why the player does not move! Hope someone helps! Quote Link to comment Share on other sites More sharing options...
+grafixbmp Posted February 9, 2011 Share Posted February 9, 2011 Every time your loop cycles, the x and y of your player never change because thoes should be set outside of your loop. Quote Link to comment Share on other sites More sharing options...
yuppicide Posted February 9, 2011 Share Posted February 9, 2011 First off, you don't need to set a variable to move players. So the x = 50 and y = 50 are not necessary. Just go player0x = 50, player0y = 50 instead. Then later on to move them to player0x = player0x +1, etc. Quote Link to comment Share on other sites More sharing options...
diogoandrei Posted February 9, 2011 Share Posted February 9, 2011 Something like the attached files... It's really better if you also attach your files in here, so someone can open them up and post a correction or something like that. By the way, have you checked this thread? moving.bas moving.bin 1 Quote Link to comment Share on other sites More sharing options...
JorgeLiborinho Posted February 9, 2011 Author Share Posted February 9, 2011 Thanks everyone! I've solved the problem! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.