Hello!
I have another few questions today that I hope you guys can help me for like that you had helped me last time
One) I have a door created, as seen in this code:
Main hall is a room. Main hall is north of Rusty house door. “The main hall of the house.”
A door is a kind of thing. A door can be openable. A door can be open. A door is usually openable and closed.
Rusty front door is a door. Rusty front door is north of Outside House and south of Main Hall.
Carry out opening a door:
say “You slowly push open the door”;
Which works just fine. However a few things I am not sure to do/want to have happen. Firstly, I want the player to have a key in their inventory at the start of play (I know how to do that bit) but then I want it to only be openable with the key in ones inventory. I guess that’s a check rule? But not too sure what to put (as Check and carry out rules confuse the hell out of me for some reason). Also, I want it so the player HAS to type “Open rusty front door”, and that it shuts upon going through it either way. What’s happening right now is that the door stays open, and that if you’re in Outside House or Main hall and then type north or south respectively, it will automatically open the door and then go into the room. While this isn’t an issue, it just doesn’t sit right with me.
- In my game I have an archer that you can speak to. He has three topics that can be spoken about; Werewolves, Werewolf hunters and killing werewolves. I want to make a command that allows the player to see what topics are available to be spoken about to the archer (and then other characters later in the game as this is rather important to deepen the lore and story). I tried to make my own code for this but it doesn’t do anything. Did I do something wrong or is there another way to go around this?
Code:
list-asking is an action applying to one thing.
understand “ask [thing]” as list-asking
Check list-asking:
if the noun is not the Archer, say “You cannot ask any questions”;
After list-asking the archer:
say “[Topic entry]”;
(Table is called Table of Archer Responses)
Cheers!