So I'm making a adventure game in .bat, and I want it so that when the player presses - it takes him to the Map frame and when he presses = the player goes to the Journal. I already worked out a way to return to the frame that the player was originally in, but I need to know how to set up key bindings.
Key bindings are a key that you press at anytime, and when you press it something happens, like you go to a map or teleport.
相关问题
- xcopy include folder
- Batch file if string starts by
- Jenkins - cmd is not recognized
- Does specifying the encoding in javac yield the sa
- String Manipulation with case sensitivity
相关文章
- 在vscode如何用code runner打开独立的控制台窗口,以及设置好调试模式时窗口的编码?
- Extracting columns from text file using Perl one-l
- How can one batch file get the exit code of anothe
- Command line escaping single quote for PowerShell
- How to make jenkins fail at a failing windows batc
- Problems using start-process to call other powersh
- Python utilizing multiple processors
- Why do all Pre-build or Post-build events in Visua
As stated in the comments your best bet is to use choice. The main setup for choice is:
@choice [/c:] [/n] [/t /d ] [/m <"Text">]
The /c attribute lists all the available choices (i.e /c:123) would allow 1, 2 or 3 to be pressed.
The /n specifies not to display the inputted choices. (i.e the choices "123" would show up in console as [123]?) For [123]? to be shown leave out the /n
/t sets the time before a default choice is made
/d sets the default choice to be made after /t seconds
/m sets text to be displayed in the console window
For Example:
Would display:
And if 2 was pressed:
And of course you could add code to these sections instead of just displaying text.
For more info about "choice" click here