I7 - Scene structure (was: Unconditional conversations?)

Hello! Like many before me, I have started playing around with Inform 7. Part of my job is programming, but I have never used Inform 7 before and I’m having some difficulties wrapping my head around some of the concepts I suppose.

I have made some simple interactive rooms with some puzzles and everything has been very nice so far, the documentation works very well and I’ve mostly been able to figure out how to make things work. Need item to do X on Y, Y needs to be in a certain state (open, closed) need to have inventory items etc.

Now I’m starting a new project and I’ve essentially ran into a problem right away :slight_smile: What I’m trying to achieve is this:

Play begins with the player sitting in a chair in a room. (so far so good! got it totally covered). I want to player to be receiving a lecture from a character in the room. Showing a couple of paragraphs of text ending with “And our newest recruit Player!, raise your hand player!”. At this point the player should raise their hands and on wrong entries or attempts to leave the room be scolded by the character in front of the class.

Things I’m having trouble with: How do I structure a small bit of ‘captive’ narrative like this? How do I do it without wrecking the definitions of everything later in the game, etc. I’d really appreciate it if someone could point me to the part of the documentation that I should read about this, or if someone could sketch me a working example of this.

Thanks for taking the time reading this!

edit: I changed the topic name since I think I failed to understand how much I didn’t understand. :slight_smile:

Here’s how I would code that. (Assuming that you’ve created a new action called ‘raising hands’.)

Introduction is a scene. Introduction begins when play begins. Introduction ends when [something changes].

Instead of doing anything except raising hands when the Introduction is happening...

I think maybe my level of ignorance is slightly larger than I thought. I’m even having trouble creating state in a scene. I’ve tried something like:

When introduction begins:
say “Welcome new recruits.”

I don’t really know where to go from there. I need to keep track of some state as to how far the introduction has progressed, but only in the context of that one scene. I want to move to the next line of the monologue once the player raises their hand, or stands up, or says ‘yes’ for instance. I imagine I can create an action of ‘positive response’ or something but that would then remain for the entire game won’t it?

Maybe I’m thinking too much in ‘normal programming’ terms of scoping etc?

I don’t even, for instance, understand how to make sure that the text starts after the banner. If I start the introduction scene ‘when play begins’ stuff happens before the banner which I’d like to avoid for instance.

SO CONFUSED! :slight_smile: Thanks for helping me.

You might want to look at the Day One example in the documentation–it seems like exactly what you’re trying to do.

Thank you! That was very helpful. I’ll see if I can integrate this in a way that I like and probably ask more silly questions.