I'm creating an escape game and just as the title says when I click on an actor I want another actor from a different world to be removed and an other actor to take it's place. I'm new to greenfoot by the way, tnak you in advance
public void act()
{
if(Greenfoot.mouseClicked(this))
{
Greenfoot.playSound("Piston.wav");
world a = inkomthi
a.removeObjects(getWorld().getObjects(keuthi.class));
a.addObjects(getWorld().getObjects(keukthi.class));
a.removeObjects(getWorld().getObjects(bibthi.class));
a.addObjects(getWorld().getObjects(bliblotthi.class));
}
}
public kistthi(){
GreenfootImage image = getImage();
getImage().setTransparency(0);
}
