Help Me Understand “Prompt” in Gruescript

Although there is no discussion of it in the manual, there seems to be a command in Gruescript called “prompt” which seems to print text to the scroller. I can’t quite work out how this is different from “say”, and what situations would require something unique from it, because of the lack of documentation in the manual.

Can anyone help me understand this command?

1 Like

The explanation is a bit hidden in the comments in the “Cloak of Darkness” example, which is in the documentation in Appendix III:

We’ll use ‘display’ and ‘prompt’ to make the mock prompt look like that

It’s also in the version of the same example game that’s loaded up in the editor:

verb hang
display hang {$held} # how it's displayed in the button
prompt hang {$held} on {$this} # how it's displayed at the mock command prompt

So, prompt controls what is printed to the mock command prompt, which is the line in the output that starts with “>” and shows what a typed command corresponding to the action would look like if Gruescript had actual free-form input.

Since this isn’t what’s really executed by the system, you can set it arbitrarily. In the given example, if you change the line to “prompt arglebargle”, then the resulting text output when the player clicks on the “hang cloak” button next to the brass hook will be:

> arglebargle
You hang the cloak on the hook.

4 Likes

Ah, I see! Brilliant. Thanks!

2 Likes