Command "."
m4u
10 Mar 2014, 18:21Hi guys, I just noticed that when I type "." nothing happens. Can I use it as a command for something? How? Thanks

jaynabonne
10 Mar 2014, 19:30A period is a separator between commands. So if you do "n. s", then it will go first north and then south. You can't do much else with it.
It has drawbacks. For example, I had a character named "Mr. Garlan" once. When I typed "x mr. garlan", it turned it into two commands ("x mr" and "garlan"). It took me a while to figure out why it actually did the look but then gave an error.
It has drawbacks. For example, I had a character named "Mr. Garlan" once. When I typed "x mr. garlan", it turned it into two commands ("x mr" and "garlan"). It took me a while to figure out why it actually did the look but then gave an error.

m4u
10 Mar 2014, 19:58I see, isn't it better to do that with a "," or an "and" and let free the "."?

jaynabonne
10 Mar 2014, 20:54I believe a period was the historical Infocom multi-command separator (where "and" was used more for joining multiple objects - like "drop apple and banana"). So there is some precedent.
But feel free to customize it however you like...
But feel free to customize it however you like...

m4u
10 Mar 2014, 22:45I don't remember that, I though it was a "," but anyway, how can I customize that?

jaynabonne
11 Mar 2014, 07:35Keep in mind that I'm looking at the 5.5 source...
In HandleCommand, there is this line:
You could either change the "." to be "," (if that's what you want), or you could just generate an empty list and add the single command:
In theory (in other words, as far as I suspect without having tested it), you'd get the "." through, and you could match on it. I know you can use odd punctuation in your commands - I experimented for a while with having a command like this:
"some dialogue text
where the command was the quote, and the rest would be input dialogue from the player. Of course, I had no idea what to do with the text once it was input, but I did work out that you could have odd commands like that.
In HandleCommand, there is this line:
commands = Split(command, ".")
You could either change the "." to be "," (if that's what you want), or you could just generate an empty list and add the single command:
commands = NewStringList()
list add(commands, command)
In theory (in other words, as far as I suspect without having tested it), you'd get the "." through, and you could match on it. I know you can use odd punctuation in your commands - I experimented for a while with having a command like this:
"some dialogue text
where the command was the quote, and the rest would be input dialogue from the player. Of course, I had no idea what to do with the text once it was input, but I did work out that you could have odd commands like that.