You might want trying just to make a loop out of this so you only have one addObject line. Or, you might consider putting "new Bird()" in place of the "bird" (and therefore removing the line where you declare bird) since bird applies to only 1 of them.
first of all, you have to manually add the objects into your world class. We can't interactively add them when you export the scenario to Greenfoot Gallery.
Also, getRandomNumber generates a random integer between 0 (inclusive) and your number (exclusive).
so if we suppose that we have *random* assigned to the random number, you could make a loop that repeats *random* number of times and places an object into the world each time.
If your increment for getRandomNumber is small, it might get the same random number 2 times in a row, making it seem like you are using the same number as before. Making your source code available would be much better so I can see where your code needs editing.
Hope this helps!
In order to add objects, you must manually write the code into your world's constructor. We can not create new objects ourselves when the file is uploaded to greenfoot gallery.
For example, in the constructor class in the world, use the method addObject to add a new object in.
2008/12/27
animation tutorial results
2008/12/24
animation tutorial results
2008/12/17
gfoot game
2008/12/15
TicTac
2008/12/14
TicTacWin
2008/12/1
ShanCalc
2008/11/20
enigma
2008/11/7
Puzzle Engine
2008/11/7
SonarWay