multiple tasks to complete a singular mission

I am designing a game for my students in which they will meet characters in the rhetorical situation (appropriately named Logos, Ethos, Pathos, Kairos, and Doxa) and each character will need a specific item that speaks to their name. I think I can figure out what to for the “wrong” items (write something like: instead of giving ___ to Logos, say “He shakes his head and drops the ___!”, etc.) and I will allow for the singular item to be taken by the right character.

However, what I’d like to ultimately happen is that when all 5 characters are holding their item, a door will unlock (or a key will appear, etc.) so that the player can advance. How would I write this? Let’s say Logos needs the LogosKey, Ethos needs the EthosKey, etc. if anyone is up for explaining the beginning part of how I will code this. Only when all 5 characters have the right item should an advancement opportunity happen.

Thanks so much.

You could do something like this (untested):

Every turn when the secret door is locked and Logos encloses LogosKey and Ethos encloses EthosKey and ... now the secret door is unlocked; say "The secret door is unlocked!".

Or if you want to be able to refer to the requirements more than once, you can use “To decide”:

[code]Every turn when the secret door is locked and the requirements are fulfilled:
now the secret door is unlocked;
say “The secret door is unlocked!”.

To decide if the requirements are fulfilled:
if Logos encloses LogosKey and Ethos encloses EthosKey… , decide yes;
decide no.[/code]

Nah – an Every Turn rule will continue to fire every turn, once the secret door is unlocked. If you do it this way, you’ll need to shut off the Every Turn rule so that it only fires once. The final condition in the list of conditions would need to be “…and the secret door is locked.”

Secret doors … I don’t recall if the extension Secret Doors by Andrew Owen is in the public library. I have a functioning copy of it, if you need one. It would be easier just to use a big strong oak door that’s locked, and unlock it when the time comes.

As a suggestion, rather than implement characters (which are complicated, typically), you might want to consider just having nice carved wooden boxes labeled Ethos, Logos, and so on. Putting the right object in the right box is dead simple programming.

Jim: isn’t that condition already in there?

If you want to make doors appear and disappear, try Disappearing Doors by Andrew Plotkin. Or just have it become unlocked, as Jim suggested.

This might work (also untested!):

5Key Advance is a scene.

5Key Advance begins when Logos is carrying LogosKey and Ethos is carrying EthosKey (etc);

When 5Key Advance begins:
     say "You have solved the puzzle! A secret door opens.";
     Now secret door is unlocked;

This would only fire once when all the characters are carrying their respective keys.

Speed-reading before the morning cup of coffee. How embarrassing!

It doesn’t sound like you really even need a door. For complicated reasons, you have to do special stuff to move doors around or reveal doors that weren’t there before–but making a new exit where there wasn’t one before is straightforward. So you could do something like this (untested):

[code]Agora is a room. Olympos is a room. [Note that Agora and Olympos start out unconnected.]

Gate discovered is a truth state that varies. [It’ll start out false; this keeps track of, well, whether we’ve discovered the gate; in bg’s code “the secret door is locked” plays that role.]
Every turn when gate discovered is false and the requirements are fulfilled:
change the east exit of Agora to Olympos;
change the west exit of Olympos to Agora; [see section 3.26 and 8.5 of Writing with Inform; this is a special phrase used for changing map connections, and you have to do both to make the map connection two-way]
say “With a roar a passage opens east from Agora to Olympos.”; [if the player might not be in Agora you’ll want to make this message different depending on whether they can see the secret passage]
now gate discovered is true. [gotta do this so the every turn rule won’t fire!][/code]

And then use a “To decide whether the requirements are fulfilled” rule like bg’s.

Exactly how you do this depends on what you want your students to experience. If you don’t want them to know that a passage will open for them, then you’ll want something like this or the secret door, which allows for a passage they hadn’t discovered. If you do want to know there’s an obstacle there, then a locked door is good, or maybe a guardian who says “You cannot pass until the five characters have their appropriate objects!” (Except a better message.) Then you could write an “Check going east from Agora” rule that checks whether the requirements are fulfilled and has the guardian block the way if they aren’t. Or, if it’s not important that they be able to go back, you could even have them transported to the next area once the requirements are fulfilled. (Or maybe it’d be more fun for them to go themselves?) There are lots of ways to do it.

I don’t think the original poster said anything about making the door hidden. “Secret door” just happened to come to mind when I was trying to think of an example name for a door. Sorry for the confusion!