Starting scenes

Hi All,

I’ve been learning inform for a few weeks now, and have a cool idea for a story. A character driven story about a night at a Inn, where you win if you survive the night. To aid in this I’ve given the characters a value called the friendship rating that can go up or down depending on the actions of the player. The question I have is: I would really like to arrange scenes to start when a characters rating hit a certain point. For example when the Merchant’s rating is less than -10, he begins arguing with the player.
I know scenes are supposed to start in response to a condition, but is there a way to get around this?


It sounds like a condition is what you want.

The argument begins when the friendship rating of the merchant is less than 10.

In cases like this I would always instinctively put the code for starting the argument in the code that makes the friendship counter go down.

And I would invariably get flustered when I realised scenes don’t like starting that way.

I7 requires an I7 mindset, to be sure.

This seems Inform7ish to me. However, if you do go this route, beware that the argument scene may start multiple times–each time the friendship goes below -10, the scene will start.

You can prevent this in other ways, say, by making it impossible to recover friendship points or by having the Merchant leave play after the argument, but it’s something to keep in mind so it doesn’t surprise you.

Unless you defined the scene as “recurring” that isn’t a problem. By default scenes can only happen once.

I have tried starting the scene with a statement like like this, but Inform doesn’t recognize it as a condition. I suppose because its a value? I thought there might be some tricksy way of wording it so having a value at a certain level would be seen as a kind of condition.

Values are fine.

The Kitchen is a room.

The merchant is a person.

A person has a number called the friendship rating.

The argument is a scene.

The argument begins when the friendship rating of the merchant is less than 10.

Post your code. Chances are it’s just an error in syntax, which can be tricky to spot in Inform 7 since most statements read like English.

Thank you, it was indeed syntax. ‘When the merchants rating is less than 0’ does not work, gotta swap that sentence structure :blush:

So another questions on scenes, can you have multiple conditions needed to start them? I ask as a lot of the scenes I am planning are about interactions between the player and other characters, so the rating, the time of night, and whether the player can see the character are all relevant conditions. So can you have a set of conditions needed to start a scene, or do you nest scenes inside other scenes?

Thanks all

You can combine conditions with AND and OR.

Arrival begins when the apple is off-stage and the player is in the Laundromat.
Arrival begins when the apple is off-stage or the player is in the Laundromat.