Hello all. I am wondering if there is anyway to accept an arrow-key button press as input.
I am creating a text-based fantasy-adventure game and I would like to use this for movement.
For example:
I'd like to have the user be able to hit the arrows (on the lower right side of the keyboard) for their character to turn and face whatever direction their key corresponds too, and WASD for their character to move (forward, strafe left, backwards, strafe right) all while in that direction.
I would use the "choice" command, but I don't know I would take the arrow keys in.
Now, I can't tell if this might be cumbersome or not but my last method of movement had some very fuzzy logic so this seems like a better alternative.
Thanks!
Accepting Arrow-Key Input
Moderator: DosItHelp
Re: Accepting Arrow-Key Input
I believe this topic has already be covered on the forums. Just need to dig up the thread. Pretty sure it is not possible if I recall correctly.
viewtopic.php?p=34426
viewtopic.php?p=34426
Re: Accepting Arrow-Key Input
Squashman wrote:I believe this topic has already be covered on the forums. Just need to dig up the thread. Pretty sure it is not possible if I recall correctly.
viewtopic.php?p=34426
Ahh thank you so much! This seems pretty impractical, so I will try to figure something else out.
Re: Accepting Arrow-Key Input
There is no way to read extended keys using native Batch file commands. You may do that via an auxiliary third party .exe program, like my getkey.exe one. You may download it from this site; look for program #3.
Antonio
Antonio