Question from a newbie

I have a question about a particular thing I’d like to see happen in my IF, but can’t quite think of how to make it happen:

In the room the player begins in, I want them to have to stay in that room until they find and carry two items. Finding/carrying the items was easy to figure out…but how do I keep them in that room? I have searched the manual a bit, but I feel like I’m missing something.

Any advice you have would be most appreciated!

You want to keep them from going from a particular room, so you hook into their attempts to do that by using a Before going from [the name of the room here] rule. In order to check whether the player is carrying the needed items, you use a conditional (“if”) statement: if the player is carrying the [first item's name here] and the player is carrying the [second item]: [tab]continue the action; otherwise: [tab]say "None shall pass!"

Put it together, and you get something like this:Before going from the throne room: [tab]if the player is carrying the orb and the player is carrying the scepter: [tab][tab]continue the action; [tab]otherwise: [tab][tab]say "None shall pass without both orb and scepter!"

That worked in-so-far that the check message I put in popped up, but it still lets you leave the room. Here is my my info put into that code:

Before going from the parlor: if the player is carrying the koi fish and the player is carrying the broken compass: continue the action; otherwise: say "You think about going off to explore the house, but you can't help but feel that there are still important things in this room."

In other words, “You think about going off to explore the house, but you can’t help but feel that there are still important things in this room,” comes up on the screen, but it still puts you in the room to the west.

Before rules don’t stop the action by default. You want to use instead, or else put ‘stop the action’ in after the you-can’t-leave message.

Thank you SO much! You guys are great!

You could also phrase it like this.

Before going from the parlor: unless the player is carrying the koi fish and the player is carrying the broken compass, say "You think about going off to explore the house, but you can't help but feel that there are still important things in this room." instead.

Hope this helps.