Basic Response to an Empty Input?

Hey everyone,
I have a problem that feels like it should be super easy to fix, but I can’t find the solution anywhere. By default in TADS 3, if the player just hits the return key without any input, the parser says “I beg your pardon?” Is there any way to change this response? In particular, I would just like it to show the room description again, basically remapping it to the “look” IAction.

Yes sir (or yes ma’am, as the case may be)… you need

modify libMessages
  emptyCommandResponse() {  /* your code */ }
;
2 Likes

I like your idea of executing a a ‘look’ command with an empty line, by the way… I might possibly copycat that…

2 Likes

Thanks John, this worked great!
I think that there’s a fair number of IFs out there that utilize this strategy as well (or maybe other languages/versions of TADS have this as the default), and it is certainly more interesting than “I beg your pardon?” I guess it depends on your style of game.

For anyone else trying to accomplish this, you can use John’s code above, but replace “/* your code */” with “gActor.lookAround(true);” and it should do what you want.

Thanks again!

2 Likes