function finish()
{
  var boiler = getName("boiler");
  boiler.ac(0);
  removeTile(1,2, "ground");
  removeTile(1,1, "ground");
  removeTile(1,0, "ground");
}

function openDoor()
{
  var door = getName("door");
  door.ac(1);
  removeTile(7, 2, "ground");
  removeTile(7, 2, "ground");
  delay(1, finish);
  sfx("p3/door_open_metal");
}

function startBoiler()
{
  var boiler = getName("boiler");
  boiler.ac(1);
  delay(1.1, openDoor);
  boiler = getItem("cheese");
  boiler.parent.visible = true;
  sfx("p3/boiler_start", onBoilerStartSfx);
}

function onBoilerStartSfx()
{
  loop("p3/boiler_loop", 8, 9, 3);
}

setTile(1,2, "ground");
setTile(1,1, "ground");
setTile(1,0, "ground");
var pipe = getName("pipe");
pipe.ac(0);
pipe = getName("switcher");
pipe.ac(0);
pipe = getName("fish");
pipe.se(1, true, 41, startBoiler);
pipe.ac(1);
pipe = getObj("hint");
game.remove(pipe);
pipe = getName("hole");
pipe.ac(1);
pipe = getItem("cheese");
pipe.parent.visible = false;