# Couple of questions

I am currently working on a game based on a short story I wrote many years ago at school. I have decided to split the game into parts and chapters. Mainly just to make it easier on me to work on. However I am wondering if there is a way that when I reach the end of the first part that it becomes locked out and the player can’t go back.

Also I am wanting to create a puzzle where if a player tries to force a door open it kills them. Unless they have met some conditions and have a specific inventory item. I don’t want to to be a one shot thing as I want to give the player fair warning. The process I have in my head is like this.

If the player tries door
Then warning 1
If the player tries the door and warning = 1
Then warning 2 “are you sure you wish to override this?”
If player tries door and warning = 2
Then player death.

I hope this makes sense. Also I am not looking for complete sources. I wish to try and learn as much as I can without really relying on completed sources. So if there are specific commands then maybe point me in the right direction if it is possible

Sure. The simplest way to do this is to move the player to a location that is disconnected from part one with “now the player is in…” See §8.9. Moving the player in Writing with Inform.

Here’s a simplified example.

``````The scary door is a door. It is north of Outer Chamber and south of Inner Chamber.
It has a number called warnings given. The printed name is "[if location is Inner Chamber]not-so-[end if]scary door".

A protective charm is in the Outer Chamber.

Report opening the scary door when the player carries the charm:
instead say "You swing open the scary door, confident in the protective power of the charm."

Instead of opening the scary door when the player does not carry the charm:
now warnings given of the scary door is warnings given of the scary door plus one;
if warnings given of the scary door is:
-- 1: instead say "I don't know. That door is pretty scary.";
-- 2: instead say "The scary door is totally freaking you out. Be very sure.";
-- otherwise:
say "You swing open the scary door.";
end the story saying "You have been devoured".

After looking in the Inner Chamber:
end the story finally saying "You have been protected".

Test success with "open door / g / take charm / open door / n".
Test failure with "open door / g / g".``````

The key elements are the door having a “warnings given” number property that tracks how many times the player has been warned (see §4.8. New value properties) and the instead rule for opening the door that bypasses the normal opening action if the player isn’t holding the charm (see §7.2. Instead rules). There are some other elements that I’ll leave for you to investigate. Feel free to ask more questions if you get stuck.