Rabbit 2600 Posted June 17, 2013 Share Posted June 17, 2013 I just realised I've forgotten how to make a missile go towards player0. I know it has to do something like if missile0x/y is less or more then player0x/y then missile0x/y +/- 1. I tried this but it dosn't work. The effect I'm after is for the missile to go in a straight line towards the player and then pass him. Once it hits playfield it resets. if missile0x < player0x then missile0x + 1 if missile0x > player0x then missile0x - 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted June 17, 2013 Share Posted June 17, 2013 if missile0x > player0x then missile0x = missile0x - 1 else missile0x = missile0x + 1 if missile0y > player0y then missile0y = missile0y - 1 else missile0y = missile0y + 1 Quote Link to comment Share on other sites More sharing options...
Rabbit 2600 Posted June 17, 2013 Author Share Posted June 17, 2013 Thank you =) 1 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.