Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Questions I have
Patrik Offline
Frictional Games

Posts: 127
Threads: 3
Joined: Jun 2013
Reputation: 25
#14
RE: Questions I have

(09-25-2015, 08:59 PM)Rapture Wrote: Do you know what the function is called for grabbing the Keyboard/Mouse input?

You should be able to get by with using the OnAction callback that's called in levels, modules, player states and probably other things as well. You can also use the cInput_* functions for directly checking an eAction from anywhere in the code.

cInput_BecameTriggered(eAction_Jump)

You can set up your own eActions in InputHandler.hps and InputHandler_Types.hps if you need something not already defined.

That's the recommended way of doing things and the only way we do it in all of SOMA, but I think you can also do cInput_GetKeyboard()/cInput_GetMouse() to get direct access if you really want to. Something like:

cInput_GetKeyboard().KeyIsDown(eKey_Space)

Haven't tried it myself though and will quickly get complicated if you want to rebind keys or allow gamepad use.
09-26-2015, 10:11 AM
Find


Messages In This Thread
Questions I have - by Rapture - 09-25-2015, 01:40 PM
RE: Questions I have - by Aaron - 09-25-2015, 08:41 PM
RE: Questions I have - by Rapture - 09-25-2015, 08:59 PM
RE: Questions I have - by Patrik - 09-26-2015, 10:11 AM
RE: Questions I have - by Aaron - 09-25-2015, 09:12 PM
RE: Questions I have - by Rapture - 09-26-2015, 05:19 PM



Users browsing this thread: 1 Guest(s)