Adding a prefix to each output in Inform 7

Hi there,

In Inform 7, is there a way to add a varying chunk of text (set in a variable) at the beginning of each output?

I found a way to change the input prefix ("When play begins: now the command prompt is "What now? "), but how to do quite the same for the answer?

Many thanks for your help!

1 Like

How often do you want this prefix to appear? Often a single sentence is made up of several different strings, so putting it at the beginning of each string will lead to strange output (“OUT: You OUT: pick up OUT: the book”).

If you want it to appear once per command:

After reading a command: say "OUT: [run paragraph on]".

Just perfect! Thank you very much!

1 Like