How do I show Twine code in a live game?

Twine Version: 2
sugarcube 2.26.1

I’d like to be able to display the actual Twine code in the passage while the player is playing. Like combining <<print passage.text>> with verbatim markup so the passage text is retrieved and then printed verbatim as the passage markup.

Is this possible?

1 Like

the verbatim markup is here

I haven’t tried this myself but it seems like it’d be possible (using Story.get() for retrieving the passage object first). is there an issue you’re encountering when you try it?

1 Like

You can use this:

<<print '<nowiki>' + Story.get(passage()).text + '</nowiki>'>>
1 Like