Hi everyone,
I have a fireplace inside a room. The fireplace is large enough to walk into and you can also climb up inside the chimney, which are 3 rooms stacked up on the fireplace. Originally, I made all these as room objects. This was working for the most part, except for when the PC tried to EXAMINE FIREPLACE from the sittingRoom. The response was ‘You see no fireplace here."‘
I tried to change the fireplace and insideFireplace rooms to booth objects but now the entry into the fireplace booth isn’t listed at all. I am including the code when I had them as room objects. For clarity, the firebox room object is north of a sittingRoom room object (which is not in this section of code).
My question is, how can I code this so if the player tries to EXAMINE FIREPLACE from the sitting room, they get the description of the fireplace.
There are some travelBarriers, too. ![]()
castleFireBox: Room 'fireplace'
"The large fireplace separates the sitting room and dining room. It's large enough to walk into. "
south = sittingRoom
north: TravelConnector
{
destination = insideFireBox
travelBarriers = [fireBarrier, ladderBarrier]
}
;
fireBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return !insideFireBox.fireBurning; }
explainTravelBarrier(traveler, connector)
{
"Surely you wouldn't walk into a fire. ";
}
;
ladderBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return !ladder.isIn(me); }
explainTravelBarrier(traveler, connector)
{
"The ladder is too big to take into the fireplace. ";
}
;
insideFireBox: Room 'inside fireplace'
"Inside the fireplace, dim light filters down from above.
<<if ironKey.isIn(castleChimneyFloor2)>>Looking up, you can just make out something hanging off a hook. It's way out of your reach.<<end>> "
fireBurning = true
south = castleFireBox
up: TravelConnector
{
destination = castleChimney
travelBarriers = [upBarrier, carryLadderBarrier]
}
travelDesc = "You step into the soot covered fireplace. ";
upBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return (leg2.ladderAssembled && ladder.isIn(insideFireBox)); }
explainTravelBarrier(traveler, connector)
{
"You can't simply scale the chimney walls. ";
}
;
carryLadderBarrier: TravelBarrier
canTravelerPass(traveler,connector) { return (!ladder.isDirectlyIn(me) && ladder.isIn(insideFireBox)); }
explainTravelBarrier(traveler, connector)
{
"You must drop the ladder here first. ";
}
;
castleChimney: Room 'chimney''space above hearth'
"The bricks are covered in soot. You're about six feet from the ground.
<<if ironKey.isIn(castleChimneyFloor2)>>Looking up, you can just make out something hanging off a hook. It's way out of your reach.<<end>>"
up = castleChimneyFloor1
down = insideFireBox
;
castleChimneyFloor1: Room 'chimney''space above hearth'
"This part is getting narrower. You're about ten feet from the ground. "
up = castleChimneyFloor2
down = castleChimney
;
castleChimneyFloor2: Room 'chimney''space above hearth'
"This part of the chimney is very narrow. You can't go up any further. "
down = castleChimneyFloor1
;