So here is the gist of it; i been trying to make my door that gets removed after its clicked, to change its image from the closed door to an open door.
The ways I've so far: The typical setImage(_filename_) but then realised you cant really change an image from an object that has been previously removed.
So the second thing I though of trying to do is creating another object with the name openDoor and have it replace the previous door when clicked. But that is pretty much where i got stuck.
So the question here is is there a way to change the image of a removed object by either replacing the old object with a new one? or at least have it change its old image to a new one after its been removed?
Here is the door code just as a reference:
So just a quite brief up; the lockpicks are just a way I used to make the doors open. Think of them as the keys used to unlock/remove the doors.
private void chkDoorOpen()
{
Dungeon dungeon = (Dungeon) getWorld();
Lockpick_total lTotal = dungeon.counter;
if (Greenfoot.mouseClicked(this) && lTotal.getLockpick_total() > 0)
{
lTotal.sub(1);
getWorld().removeObject(this);
}
}

