hey am trying to make an actor fall from the top screen randomly but within a time limit
this is my code and i don't see it falling any help thnxx
public void random()
{
int delay=5;
int ranx = Greenfoot.getRandomNumber(377);
int rany= Greenfoot.getRandomNumber(266);
if (delay>0)
{
delay--;
}
else if(delay==0)
{
addObject(new other(),ranx,rany);
delay=5;
}
}



