How to set an object to 20 pixels from the right and 100 from the top of the World. Make y increase by 40 pixels in a vertical line?
int steps = 0;
while (steps < 40)
{
setLocation(getX(), getY()+1);
Greenfoot.delay(1);
steps++;
}