Game controls as string inputs [c#]
In a game, we usually use assign a single button for a particular action. (eg: 'spacebar' to jump, 'w' to move forward, etc).
so what i want is to type the whole word on the keyboard for that action to occur. i.e. ('MOVE ' to move right, 'JUMP' to jump, etc).
Is there a string checking algorithm or library function that checks this at run time.
Thank you for your attention/time :)
This sounds interesting. Re$$anonymous$$ds me of this game. I think maybe you check user input in Update(). Cache whatever user typed. Once the user hit Enter (or some seconds passed...), use a switch statement to call your desired functions. PS. just some simple thoughts I don't know if it's the best way to do it
thanks for the reply. sorry, it took so long for me to respond. Since then, I have dropped the project and moved on to other projects. I will look into it once I am done with my current project. Thanks again for sharing this with me.
But do keep posting, if you find something related.
Your answer
Follow this Question
Related Questions
Comparing string stored in a game object (Not the object name) 0 Answers
Can you put morse code i a text box by using space key fot dot and dash 0 Answers
Mobile into PC 1 Answer
Remap keyboard/keys for InputField 0 Answers
Input Manager - prevent keyboard keys mapping to Xbox controller buttons 1 Answer