simple yes or no conversation between NPC and player

Hi, All

I’m new to I7, and I’m trying to write my second brief story to show my students (teachers) how IF might be used as a response to literature. I’d like to have a NPC ask the player a yes/no question. I don’t know how to code this, and the examples I’ve read (Sybil 1 and SYbil 2, among others) just don’t make sense to me. Ideally, a “yes” answer leads to one set of circumstances, and a “no” option another (but I think I know how to do that). I’m just not getting it. Any help is appreciated! Thank you!

Jeanne

Try looking at section 11.5 of the documentation, with particular attention to “if the player consents.” When the game encounters “If the player consents,” it stops everything for a yes/no answer. So you could have something like this:

Hertfordshire is a room. "The hustle and bustle of society surrounds you." Mr Darcy is a man in Hertfordshire. After looking in Hertfordshire: say "Mr Darcy says, 'Do you find me at all attractive?'"; if the player consents: say "It almost looks as if Mr Darcy may be considering a smile."; otherwise: say "Mr Darcy broods."

Example 171, “Proposal,” gives two different ways of handling yes/no questions; either with “if the player consents,” which stops everything until it gets an answer, or a more complex way that lets the player dither around doing until she decides to say yes or no (or until the proposal is withdrawn). But it sounds like you probably want the first one.