I couldn't word it in the title properly but I need help for making an actor stay at frame for a random amount of time when clicked. Whenever I use Greenfoot.delay(), it delays my whole scenario but I just want that specific actor to say in a frame for a random amount of time. What can I use instead of the Greenfoot.delay()?
public void mouseClick()
{
if(Greenfoot.mouseClicked(this))
{
setImage("wake.png");
GreenfootImage image = getImage();
image.scale(image.getWidth() + 100, image.getHeight() + 100);
Greenfoot.delay(Greenfoot.getRandomNumber(50));
}
}
