I am making a game where a certain class of actors need to follow an other actor from a different class. What I have now works fine but when a monster eats a player I get a terminal window. The terminal window says there is a problem with rule 17 and 22. Does anyone one how I can get rid of the terminal window? here is my code
public class Monsters extends Actor { /** * Act - do whatever the Monsters wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { // Add your action code here. } public void doeMonsterDingen() { if (Player.class != null) { move(4); Actor player = getWorld().getObjects(Player.class).get(0); turnTowards(player.getX(), player.getY()); } } public void turnRandom (int maxDegree) { if (maxDegree > 0) { turn(Greenfoot.getRandomNumber(2*maxDegree) - (maxDegree)); } } public void eetSpeler() { if (isTouching (Player.class)) { removeTouching(Player.class); Greenfoot.playSound ("eat.wav"); } } public void loopNietDoorSteen() { if (isTouching (Obstakels.class)) { turnRandom(90); } } }