Captain Spazer Posted January 25, 2019 Share Posted January 25, 2019 (edited) Im having a bit of trouble with my code for a map maker, I can make the player place blocks, but not remove them, any ideas on how to do that? x = (missile0x-18)/4 : y = (missile0y)/8 x = (missile0x-18)/4 : y = (missile0y)/8 if joy0fire && collision(playfield,missile0) then pfpixel x y off if joy0fire then pfpixel x y on I figured it out... I just had to swap places with these 2 lines: if joy0fire then pfpixel x y on if joy0fire && collision(playfield,missile0) then pfpixel x y off Edited January 25, 2019 by Captain Spazer Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted January 25, 2019 Share Posted January 25, 2019 How I would do this would be if joy0fire && !a{0} then a{0}=1 if !joy0fire && a{0} then pfpixel x y flip : a{0}=0 the a{0} is needed as a flag to make sure whether the joy0fire is pressed or not. !=unpressed. Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted January 25, 2019 Author Share Posted January 25, 2019 Thank you for the tip =) Quote Link to comment Share on other sites More sharing options...
Captain Spazer Posted January 25, 2019 Author Share Posted January 25, 2019 (edited) while on the topic of pfpixel collision, how do I calculate for larger missiles? x = (missile0x-18)/4 : y = (missile0y)/8 Edited January 25, 2019 by Captain Spazer 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.