How to get the input.

This will do that very limited task:

[code]The player’s input is a snippet variable.

To get typed command as (S - a snippet): (-
KeyboardPrimitive(buffer, parse);
{S} = 100 + WordCount(); -)

After looking:
say “>>”;
get typed command as the player’s input;
say “You typed: [player’s input]”.

Test is a room.[/code]

You’ll need to convert the snippet to indexed text before you can do much of anything with it in I7.

It… works!

It does everything I want it to do. Thank you so very much.

Also, it seemed to work straight away without any odd conversions:

if playerinput in lower case matches the text title entry in lower case:

Worked great. Thank you again.

Fresh query.

KeyboardPrimitive(buffer, parse); works fine for a line, what would I use to grab the first key hit?

Something like this.

[code]Include (-

[ GetKey i;
i = VM_KeyChar();
return i;
];

-)[/code]

Hope this helps.

Hrm, I’m trying to get it into a variable. I tried this, which did not compile.

To get next key as (S - a snippet): (- {S} = VM_KeyChar(); -)

Fixed, thanks!

In that case you want something like this.

[spoiler][code]“Test”

Include Basic Screen Effects by Emily Short.

A first when play begins rule:
while 1 is 1 begin;
let k be 0;
while k is 0 begin;
let k be the chosen letter;
end while;
if k is 13 begin;
say “You pressed the Return Key!”;
otherwise if k is 31 or k is 32;
say “You pressed the Spacebar!”;
otherwise if k is 65 or k is 97;
say “You pressed the ‘A’ key!”;
otherwise if k is 66 or k is 98;
say “You pressed the ‘B’ key!”;
otherwise if k is 67 or k is 99;
say “You pressed the ‘C’ key!”;
otherwise if k is 68 or k is 100;
say “You pressed the ‘D’ key!”;
otherwise if k is 69 or k is 101;
say “You pressed the ‘E’ key!”;
otherwise if k is 70 or k is 102;
say “You pressed the ‘F’ key!”;
otherwise if k is 71 or k is 103;
say “You pressed the ‘G’ key!”;
otherwise if k is 72 or k is 104;
say “You pressed the ‘H’ key!”;
otherwise if k is 73 or k is 105;
say “You pressed the ‘I’ key!”;
otherwise if k is 74 or k is 106;
say “You pressed the ‘J’ key!”;
otherwise if k is 75 or k is 107;
say “You pressed the ‘K’ key!”;
otherwise if k is 76 or k is 108;
say “You pressed the ‘L’ key!”;
otherwise if k is 77 or k is 109;
say “You pressed the ‘M’ key!”;
otherwise if k is 78 or k is 110;
say “You pressed the ‘N’ key!”;
otherwise if k is 79 or k is 111;
say “You pressed the ‘O’ key!”;
otherwise if k is 80 or k is 112;
say “You pressed the ‘P’ key!”;
otherwise if k is 81 or k is 113;
say “You pressed the ‘Q’ key!”;
otherwise if k is 82 or k is 114;
say “You pressed the ‘R’ key!”;
otherwise if k is 83 or k is 115;
say “You pressed the ‘S’ key!”;
otherwise if k is 84 or k is 116;
say “You pressed the ‘T’ key!”;
otherwise if k is 85 or k is 117;
say “You pressed the ‘U’ key!”;
otherwise if k is 86 or k is 118;
say “You pressed the ‘V’ key!”;
otherwise if k is 87 or k is 119;
say “You pressed the ‘W’ key!”;
otherwise if k is 88 or k is 120;
say “You pressed the ‘X’ key!”;
otherwise if k is 89 or k is 121;
say “You pressed the ‘Y’ key!”;
otherwise if k is 90 or k is 122;
say “You pressed the ‘Z’ key!”;
otherwise;
say “You pressed something else!”;
end if;
end while.

The Testing Room is A Room.[/code][/spoiler]

The numbers are the ASCII values of the key pressed.

Hope this helps.

Thank you kindly, good sir.