Hi all! First post here, I’m working on my first project and it seems to be going pretty well. One thing, though, is really eating at me.
I’m using Threaded Conversation (many thanks to all of those involved, if you’re reading), and I’m rewriting the facts section so that facts can be more consistently conveyed both in and out of dialogue - and so that, like in the “Casino Banale” example, several facts can be put together, giving the player another fact when they’ve collected them all. The problem I’m having, though, is to do with saying the phrase to be printed when the fact is first learned. The text will display if I’m just asking Inform to say it, but if I check whether the player knows the fact (in order to only say it the first time the fact is picked up) it always comes out as known.
So effectively, it seems like the line “Now the player knows the new fact” is acting retroactively and taking effect before it’s supposed to, and that’s happening however I try to make that check (i.e. through values, or properties, or checking the relationship as below). The only other explanation I can think of for it is that somehow, the whole thing is happening once behind the scenes before it’s shown to the player.
Another bit of information which I am sure is relevant but I can’t work out how is that the system works exactly as it should if the [teach name-of-fact] is included in one of Threaded Conversation’s quips - but if you include it in other text such as the description of a thing, it happens as described above.
I hope that makes sense, and someone can shed some light on this - I’ve been tearing my hair out!
Relevant bit of code:
To say teach (new fact - a fact): If the player does not know the new fact: Say " [discovery of the new fact]"; Now the player knows the new fact; Repeat with kid running through facts which follow the new fact: If the player knows every fact which is followed by kid: Say " [teach kid]"; Repeat with forgetter running through facts which are followed by kid: Say forget forgetter;
I forgot to say, the facts are defined as follows, in a modified version of the Table of All Known Facts:
Table of All Known Facts fact summary child discovery generic-truth "Life is hard." nothing "I just realised that life is hard!"