Everything compiles, its just that my code doesnt actually DO anything. I've put in system.out.println's so I can see if the code is making it to certain checkpoints. The main character has this code inside his attack method. Moblin is the monster he is attacking. So I've tried attacking only from the right so far (which I would think this code would work for). moblin2 is always null though. It never makes it inside the if statement. Can anyone help me get this so it doesnt return null? Thanks
Moblin moblin2 = (Moblin)getOneObjectAtOffset((getX()+150),getY(),Moblin.class); if (moblin2!=null) { moblin2.setHealth(-1); }