This is the first story I ever wrote.
I want a character to react to being asked something by the player by taking a key she stores in her jacket, unlocking the door to her house, and entering it and shutting the door. Well, that’s easier said than done. So far I’ve tried to get her to unlock the door, so the player can enter the room, just to test it. Because that isn’t even working so far, I’m not even bothering with I’ll copypaste what’s relevant.
There’s two rooms:
The heavy grey painted door is a door. The heavy grey painted door is east of the hallway of my apartment and west of the house of the neighbor. The description of the door is "This is the grey painted door of my neighbor."
The Heavy grey painted door is lockable and locked. The key of the grey painted door unlocks the heavy grey painted door.
Then I create the woman and her clothes and her key:
In the hallway of my apartment is a woman called the old lady that lives next to you. The dark green skirt is worn by the old lady that lives next to you. The grey shirt is worn by the old lady that lives next to you. The old fashioned grey jacket is worn by the old lady that lives next to you. A container called the left pocket is part of the old fashioned grey jacket. The left pocket is openable. The left pocket is closed. The key of the grey painted door is inside the left pocket. The description of the old lady that lives next to you is "'This is the old lady who lives next to me. She has gray hair and wrinkled skin. I could ask her for help. I probably should.' You can ask her about a subject by typing: ask about 'subject'."
Then I have a bunch of code about what should happen when the player asks this old lady about the salon:
After asking the old lady that lives next to you about "salon",
say "You ask her about the hair salon. blablablablabla".
After asking the old lady that lives next to you about "salon",
try The old lady that lives next to you trying opening The left pocket.
After asking the old lady that lives next to you about "salon",
try The old lady that lives next to you trying taking The key of the grey painted door.
After asking the old lady that lives next to you about "salon",
try The old lady that lives next to you trying unlocking The grey painted door with The key of the grey painted door.
Well, guess what, when i type “ask old lady about salon” I do get “You ask her about the hair salon. blablablablabla”. However, the door is not unlocked, because I can’t open it. She doesn’t even open her left pocket, which I tested by opening her pocket after talking to her. What am I doing wrong? She does say something. Could anyone explain what I’m doing wrong?