Inform 7 if with multiple items

How do I make an if-statement that will end the game if the player is carrying certain items after going to a certain room? Any help is appreciated.

Thank You.

You can separate different conditions with “and”.

After going to the treasure room when the player is carrying the enraged badger and the player is carrying the solar panel and the player is carrying the box of ping pong balls: end the game in victory.
Note that you have to repeat the “player is carrying” part, so you can’t say “when the player is carrying X and Y and Z.”

Thank you! I’ve been trying to find out the right way to say it. However, once I put more than 4 items in the statement it gives me an error message. Any thoughts on that?

If you need to check a big collection of items, you could break that condition out into its own decision phrase, like:

To decide whether collection is complete:
if the player does not carry the red ball:
if the player does not carry …:

And then ask

After … when the collection is complete…

Awesome! That worked, thanks a lot, I appreciate it