Chapter 8: Change
8.2. Changing the command prompt

The command prompt is the text printed by Inform to ask the player for another command. Ordinarily this is simply a greater-than-sign, ">", so we tend not to notice it as text at all. Internally, though, it is a variable value called "command prompt", which means we can change it.

For example, this will be a more conversational sort of prompt:

When play begins: change the command prompt to "What now? ".

Whereas this will be more up-to-the-minute and demanding:

When play begins: change the command prompt to "[time of day] >".

("Time of day" is another variable value, which is fairly self-explanatory, but will be covered in detail later on.) The prompt can be changed at any point, so can be used to indicate the current situation, or even as a sly way to introduce a sort of conversation between computer and player.


91
 Example  Don Pedro's Revenge
Combat scenario in which the player's footing and position changes from move to move, and the command prompt also changes to reflect that.


PreviousContentsNext