
I have a scene where the player chooses an item from a list. This item will be referenced in the future, so I want to change certain lines based on this. For instance, whether the player chooses the pendant or the book, I want later lines of dialogue or narration to reference the pendant, or the book.
I could use if/else statements and write out multiple versions of each line that includes this item in the future, but that seems extremely inefficient compared to simply setting the item as a variable and calling it into each line that references the item. I'm sure there's a way to do that, but I can't figure out how.
So how do I tell the game to place a previously-defined word into text?