Hello!
I need someone’s help. I am extremely new to creating IF, and finally getting my feet wet with a Fantasy game (using a story I put so much effort into creating the world for, so I decided to just use that…).
Now, I am trying to make a certain action unlock a door, instead of a key unlocking the door. But, I keep getting the same error message. Can someone help?
Here is the code I have so far :
The Underworld is a room. “You stand in the depths of the Underworld. The darkness and blackness surrounds you. Moving around the room, you sense a door ahead of you. The cold metal tells you that before you is the Gates of the Underworld. But you can feel that the spirits of the Underworld have grown restless. You hear something awaken. It wants you to listen.”
The Gates of the Underworld is a door. The Gates of the Underworld is scenery. The Gates of the Underworld is lockable and locked. The action listen unlocks the Gates of the Underworld. The Gates of the Underworld is north of The Underworld and south of the Dark Ridge River.
Instead of going through the Gates of the Underworld:
if the Gates of the Underworld is closed:
if the Gates of the Underworld is locked:
say “(first trying to open the Gates of the Underworld) Wait, the dark spirits say. You must listen. [paragraph break].”
otherwise if the player listens:
say “(first opening the Gates of the Underworld) You feel pulled towards the open gates. Your connection to this awakening spirit disturbs you, yet it is intriguing at the same time. You desire to know more, but almost as if waking from a dream, you feel yourself wondering if what you have just witnessed was real or if you have been asleep the whole time…[paragraph break]”
now the Gates of the Underworld is unlocked;
now the Gates of the Underworld is open.
Now, here’s the error message I keep getting over and over again:
Problem. The phrase or rule definition ‘Instead of going through the Gates of the Underworld’ is written using the ‘colon and indentation’ syntax for its 'if’s, 'repeat’s and 'while’s, where blocks of phrases grouped together are indented one tab step inward from the ‘if …:’ or similar phrase to which they belong. But the phrase ‘if the Gates of the Underworld is locked’ , which ought to begin a block, is immediately followed by at the same or a lower indentation, so the block seems to be empty - this must mean there has been a mistake in indenting the phrases.
I also have another question…can I have certain “rules” I create, only when the player is in this certain area? Because later, the player may end up being in the Underworld again, and opening up the gates will be easier in that portion (much later in the game). I only want the player to have to unlock the door by listening during this scenario. So far, I have separated this section into being “Chapter 1 - Part 1 - The Beginning”.
Thanks for everyone’s help!