Author Topic: Possible to capture key presses?  (Read 4453 times)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Possible to capture key presses?
« on: May 31, 2011, 08:03:32 PM »
Is there any way to detect whether the player has pressed a key on the keyboard?

What I would like to do is assign the different tools in RoidForge to the numbers 1, 2, 3, 4, and 5.  That would make switching between tools much faster.  Does anyone know a way to capture key presses?

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Possible to capture key presses?
« Reply #1 on: May 31, 2011, 08:07:32 PM »
Impossible I guess, but one thing you can do is the up and down button, just ignore camera movement when the right mouse button is pressed and when it is not, you'll find out which way the player goes(up/down) and can do up/down on the buttons, to make it ignore any camera movements on screen you can store a variable in the end of each loop which tells if the movement is changed and if it is, move the camera to the old position. Though keys like "1","2" or "3" is as far as I am concerned impossible :/