Hey, I´m about to Programm a little game (insted of an exam in computer science).
I want my main actor to be able to move straight up and down (trough key-control and setLocation), but i Need to put an delay in there, because he moves with insane Speed. It´s actually looking like this :
public void MoveUp()
{
if (Greenfoot.isKeyDown("up"))
{
setLocation(getX(), getY() -2);
Greenfoot.delay(3);
}
This works almost how I want it to run, but Greenfoot.delay stops the whole game for a short time - I just want this actor to stop doing anything, so that he moves equably. How to do that ?
PS: This program is based on ,,Little Crab"

