Cool! Thats working now! The counter increases everytime I click a bubble, now the terminal is pointing out this:
The terminals error line says:
java.lang.IllegalStateException: Actor not in world. An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
at greenfoot.Actor.failIfNotInWorld(Actor.java:681)
at greenfoot.Actor.getY(Actor.java:170)
at Bubble.act(Bubble.java:19)
at greenfoot.core.Simulation.actActor(Simulation.java:594)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:552)
at greenfoot.core.Simulation.runContent(Simulation.java:215)
at greenfoot.core.Simulation.run(Simulation.java:205)
if (getY() > getWorld().getHeight()+10)
{
getWorld().removeObject(this);
}


