+atari2600land Posted October 5, 2019 Share Posted October 5, 2019 So I'm trying to move missile0 horizontally. I can, BUT when it reaches the side of the screen it doesn't do what I tell it to do. It just comes back the other side of the screen. I want player0 to fire the missile again. So I tried this: Move_missile0_right: lda #$E0 sta HMM0 ; Update x position to account for HMM0 movement ldx MissileX+0 inx inx stx MissileX+0 ; check if missile is far enough right yet cpx #150 bcs Get_new_enemy_missile jmp aaaaa And of course, it won't work. I've attached the whole code here. Any ideas on why it won't work? midspace17a.asm Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted October 5, 2019 Share Posted October 5, 2019 Have you checked that the actual horizontal position of the missile is equal to the value in MissileX+0? And since you are storing the position of the missile anyway, why bother using relative positioning within the program? Use the PosPlayer subroutine for the missile before you draw the frame instead. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted October 7, 2019 Author Share Posted October 7, 2019 Problem solved. As it turns out, I had put something in the wrong position in the code. 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.