differing descriptions

Ok, I know this is a stupid question.

In my game, there is a driver’s license in which the description changes with each examination. And after the 7th examination, the description will remain the same.

Your driver's licence is a thing. The first time your driver's lisence is examined: say "I nice picture of you right on the front. It's fairly hazy though, you have quite a headache.". The second time your driver's licence is examined, say "What? That's not your face... ".

Any help would be marvelous.

Either ‘The description if the driver’s license is “[one of]Desc 1[or]Desc 2[or]…[stopping]”’ (chapter 5.7 in the manual) or ‘Instead of examining the driver’s license for the first time: “…”’ and then ‘for the second time’, ‘for the third time’ and so on (chapter 9.14).

Not at all.

Changing descriptions!?! Oooh I like! :mrgreen:

Btw, consistency in spelling is important here. The original post specifies one “your driver’s licence” and one “your driver’s lisence”. That will generate an error message that’ll probably cause you to look in the wrong place for a solution, and in other situations could even have silently created a duplicate object, which you definitely do not want. :slight_smile:

This works great! thanks!
Now what should I do if I need different descriptions with an action?
I tried:

If the player unlocks the room door with the hotel card one time, say "You swipe the card through the slot.  The light turns red.".

but the error says as follows:

[rant]You wrote ‘If the player unlocks the room door with the hotel card one time, say “You swipe the card through the slot. The light turns red.”’ : but this description of a relationship makes no sense to me, and should be something like ‘X is in Y’ (or ‘on’ or ‘part of Y’); or else ‘X is here’ or ‘X is east of Y’.[/rant]

In Inform 7, phrases (like “if”, “while”, and so on) must be inside rules. Thus, you can’t just go “if this is true, do that”, because Inform has no reference as to when this situation will occur.

If you just want a message to be different the first time you use the card on the room door, you have to add your own report rule for the unlocking it with action.

Report an actor unlocking room door with for the first time: say "You swipe the card through the slot. The light turns red." instead.

Or you could make it more general:

Report an actor unlocking room door with: say "[one of]You swipe the card through the slot. The light turns red[or]Once again you swipe the card through the slot and open the door[or]Again, you open the door[stopping]." instead.

As you found out, that’s not valid syntax. You can use the “for the first time” technique just like with examining above:

After unlocking the room door with the hotel card for the first time: say "You swipe the card through the slot.  The light turns red."

Just a friendly suggestion: It looks like you’re guessing syntax since that wording and the one used in the original post are nowhere near any existing phrasing. Guessing very rarely works unless you’re trying to modify some phrase that already works (and rarely even then). If you can’t find something that does exactly what you need in the manual or the recipe book, a better technique is to find something that does almost what you need and start from there. Even then guessing rarely works but at least you have something to start from. In this case you could start with changing the description for all occasions (“After unlocking the room door with the hotel card: …”), make sure it works, and then either derive the “for the first time” rule or find the solution some other route.

Oh wow :laughing:

I am so sorry about the dreadful state of the syntax. Ok. Deep breath. It’s the morning.

Sorry I meant to use ‘instead’ but I wrote it totally wrong without checking.

But btw thanks alot for the help.