According to the wiki:
showpassage: occurs before the passage is rendered. The passage about to be shown is the ‘passage’ parameter to the event.
If I write a function that logs passage.name during showpassage, the result is the name of the previous passage (or NaN if it’s the first). Apparently passage.name hasn’t been given a value at this moment.
But for me showpassage:after is too late, because I need to use the current passage name before the passage has been displayed. (My function adds all passage names to a history, then I use that history as a condition for changing the text according to what the player has seen during the whole game.)
Is there any way of getting the name of the passage about to be displayed during showpassage?