import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class BeeHive extends Actor
{ private int numActs = 0;
public void act()
{
numActs++;
if ((300 % numActs)==0)
{
int Hive = (int)(Math.random()*20)+5;
for (int i = 1; i<= Hive;i++)
{
Bee steve = new Bee();
getWorld().addObject( steve,getX(), getY() );
}
}
if (Math.random()<.001)
{
getWorld().removeObject(this);
}
}
}
After adding the 'steve' to the world, give him a random rotation move him a random distance up to the radius required and then reset his rotation back to zero.
Your remainder operation in the initial 'if' condition is odd in that it will only be true 18 times within the first 300 acts, then never be true again. If you want 'steve's to be spawned every 300 acts, you need to reverse the values -- (numActs % 300).