Hey there, I want that Mario is changing his image every step so I took a code from Youtube but Greenfoot say that it can´t find image "Run10".
The problem is that I just want to use the images "Run1" up to "Run3".
This is the code I took:
private GreenfootImage images = new GreenfootImage;
private int jeda=10,num=0,deltax=10;
public void addedToWorld(World Back)
{
for(int i=0; i<3; i++)
{
images = new GreenfootImage("Run1" +i+".png");
}
setImage(images);
}
public void act()
{
if(jeda==0)jeda=10;
if(jeda==1){
setImage(images);
num++;
if(num>=3)num=0;
setLocation(getX()+deltax,getY());
}
if(jeda==2)jeda--;
}

