I want to make like a tank game where you shoot at balloons which are flying around... but i don't know how i can make it that when i press the space key that the object "shot" is placed in the world... please help
if (Greenfoot.isKeyDown("space")) {
getWorld().addObject(new Balloon(), 100, 100);
//instead of new Balloon() you need to use an object of the class you want to add;
//and instead of 100, 100 you can use the coordinates where you want to add the object;
}