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
Aaron Offline
Frictional Games

Posts: 20
Threads: 0
Joined: Aug 2013
Reputation: 6
#11
RE: Questions I have

The eAction_Test commands are just for debugging, for firing off functions so that you don't have to replay the whole level to trigger certain events. They are only linked to keyboard numbers 0-9.

Artist.
Twitter: @aaronjclifford
09-25-2015, 08:41 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#12
RE: Questions I have

Do you know what the function is called for grabbing the Keyboard/Mouse input?
09-25-2015, 08:59 PM
Find
Aaron Offline
Frictional Games

Posts: 20
Threads: 0
Joined: Aug 2013
Reputation: 6
#13
RE: Questions I have

Afraid not, just a lowly artist Sad. Perhaps a scripter can pop their heads in!

Artist.
Twitter: @aaronjclifford
09-25-2015, 09:12 PM
Find
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
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#15
RE: Questions I have

To get the Debug 1-9 to work.


Is their something special you need to do, to get them to work? I am in DebugMode, but pressing 1 doesn't seem to do anything.

    void OnAction(int alAction, bool abPressed)
    {
      if (!abPressed) return;
    
      if (alAction == eAction_Test1)
     {
      Entity_SetActive("construct_theta_1", false);
      cLux_AddDebugMessage("Hi");    
     }
    }
(This post was last modified: 09-26-2015, 05:20 PM by Rapture.)
09-26-2015, 05:19 PM
Find




Users browsing this thread: 1 Guest(s)