Hi,
If the act method has just one simple statement to create an object, like the following and you click on the button Act, I would think that it creates one object at the specified coordinates:
public void act()
{
getWorld().addObject (new Baloon(), Greenfoot.getRandomNumber (300), Greenfoot.getRandomNumber (300));
}
What is happening is the following:
If the world has no objects, nothing happens when you click the Act button.
If the world has one object then it creates one more object with the first click and two objects with the second click, 4 objects with the third click and so on. i.e. doubling the number of objects with each click.
I need to write code to create one object only. How can I do that?
Many thanks.

