java game bullets hit player 1 but not player 2
hey guys me again :/ i;ve almost finished the game now but i still have 1 problem, the bullets will hit player 1 and player 2 can win but player 1's bullets do not hit where the the hit area is and goes straight through player 2 any ideas y? if needed i will post the code
Re: java game bullets hit player 1 but not player 2
Is player 2 hiding in a bunker?
Re: java game bullets hit player 1 but not player 2
Your logic needs work. You have some bugs in your code.
Try debugging the code by adding printlns to show the values of variables as they change and when they are compared to other variables. Look at what is printed out when the "bullet goes straight through player 2". Compare those values to the ones where player 1 is hit.
Re: java game bullets hit player 1 but not player 2
Quote:
Originally Posted by
ajakking789
if needed i will post the code
If you want help, you'll have to post an SSCCE that demonstrates the problem. The smaller you make it, the better. We really don't have a ton of time to wade through game logic.