§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: now the command prompt is "What now? ".
Whereas this will be more up-to-the-minute and demanding:
When play begins: now the command prompt is "[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.
![]() | Start of Chapter 8: Change |
![]() | Back to §8.1. Change of values that vary |
![]() | Onward to §8.3. Changing the status line |
|