Can I chain 'after's in a conditional statement?

Is it possible to chain a series of -after- conditions? There’s a portrait hidden in the game that reveals the true nature of one of the characters as a little easter egg. I’m hoping that the first time you visit the character after knowing her true identity, you get a special piece of dialogue.
This is what I have right now, which obviously doesn’t work:

After examining the sign spinner for the first time after Zheng Yi Sao's Sketch is examined: say "With a start, you recognize her from her portrait: it's Zheng Yi Sao, the infamous pirate queen who conquered China. For a moment, she stops spinning the sign and gets a steely look in her eyes. 'You know who I am,' she says coolly. 'Then you must know what I'm capable of. If you want to stay on friendly terms, I recommend you keep this on the down-low.'".

After examining the sign spinner for the first time: if Zheng Yi Sao's Sketch is examined works as long as you look at the portrait before visiting her, and while it’s likely (it’s not that hidden), it’s not a guarantee. Is there any way to make sure that the player gets this piece of dialogue after they discover the portrait even if they’ve already examined the sign spinner?

The way to add conditionals like this is to use “when” - e.g. “after examining the sign spinner for the first time when the sketch is examined.” But while I haven’t tested this, I suspect you might run into an issue where the “for the first time” just checks for the first time the action has happened - so if the player’s already examined the sketch by then, they’ll get the special description, but otherwise they’ll miss it forever.

An easier way to manage things might just be to write a rule for examining the spinner when the sketch has been examined, and then in the say command use the “[one of]special description that only fires once [or] subsequent default description[stopping].” syntax.

2 Likes

It’s possible someone more clever than I will accomplish this without adding the examined property, but here goes:

The lab is a room.

The sign spinner is a woman in the lab.

 Zheng Yi Sao's Sketch is a thing in the lab

A thing can be examined.

After examining something:
	now the noun is examined.

After examining the sign spinner when Zheng Yi Sao's Sketch is examined for 
the first time: say "With a start, you recognize her from her portrait: it's Zheng Yi
Sao, the infamous pirate queen who conquered China. For a moment, she
stops spinning the sign and gets a steely look in her eyes. 'You know who I am,'
she says coolly. 'Then you must know what I'm capable of. If you want to stay
on friendly terms, I recommend you keep this on the down-low.'"

TIP: use three backticks to start and end a code block.

2 Likes

Thank you!! I tested it and ‘when’ worked perfectly. My backup was going to make a load-bearing token (invisible in your inventory) that you hold after you examine the portrait and disappears if you examine Zheng while holding it…but that’s VERY janky haha. I’m glad this worked so well :smiley:

1 Like

‘When’ worked perfectly!! And thank you also for the backtick tip - I was wondering why my code blocks looked weird haha

1 Like