Which methods can i use for that? i've already have an actor and it can walk around.
can i put other images next to the actor and how to do that?
The second problem is the footprint will disappear after 5 seconds.
getWorld().addObject(new Footprint(), getX(), getY() + getHeight() / 2);
changeTimer--;
if (changeTimer == 0)
{
changeTimer = MAX_TIMER;
setTransparency(getTransparency() - 15));
if (getTransparency() < 50) getWorld().removeObject(this);
}changeTimer--;
if (changeTimer == 0)
{
changeTimer = MAX_TIME; // not MAX_TIMER
GreenfootImage img = getImage(); // this was missing
img.setTransparency(img.getTransparency() - 15); // had too many ')'
if (img.getTransparency() < 50) getWorld().removeObject(this);
setImage(img);
}