[PLUGIN] Input System v0.96b (21/03/2011): Keyb+Mouse+Joy

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • Ir's not a bug from InputSystem but from the Binary object.

    If you create a Binary object before save, the InputSystem.cfg file is correct.

    I've updated the example: http://www.box.net/shared/n8i16iolnt

    Unfortunately, it's not a good idea to allocate a Binary object each time as Binary objects cannot be destroyed...

  • Thank you,

    I thought I had already avoided the binary file access issue in my step2 (delete "InputSystem.cfg" file.), but I still fall in the trap.

    I try use python to access configure save file.


    r_file = open("input_system.cfg", "r")
    [code:20ut87eu]w_file = open("input_system.cfg", "wb")
    It's work.
  • Hi,

    There is a bug about key-map in configure of event.

    See this cap file.


    + InputSystem: Key W is down
    -> Text: Set text to "w"
    + InputSystem: Key S is down
    -> Text: Set text to "s"[/code:1v8ho4xv]
    key "W" and key "S" are mapping to key "Q" and key "A". Press "Q" will trigger -> Text: Set text to "w"
  • Don't know if it helps, but changing from 'Key is down?' to 'On Key Pressed' works (possible workaround?).

  • Key is down parameter is a key code. It uses a name to be "Human readable" and the name is based on the US keyboard layout.

    So when you specify "Key W is down", it is the W key in a US layout. For a FR layout it is Z.

    To get key name you have 2 functions:

    GetKeyName(KeyCode) to get the US layout key name and GetLocalKeyName(KeyCode) to get key name for local layout.

    To display the last key pressed in local layout in you example:

    + InputSystem: Key W is down

    -> Text: Set text to InputSystem.GetLocalKeyName(InputSystem.LastKeyDown)

    InputSystem.LastKeyDown gives the key code of the last key down.

    N.B.: I think a On Char Pressed event is missing

  • Sorry, I'm not sure what's wrong.

    I try built-in MouseKeyboard object.

    + MouseKeyboard: Key W is down
    -> Text: Set text to "w"
    + MouseKeyboard: Key S is down
    -> Text: Set text to "s"[/code:2sbg9go7]
    It's correct to perform pressing "w" & "s" key. 
    What's different between InputSystem and MouseKeyboard? (They look like using US layout, too.)
  • No, MouseKeyboard test the character entered by the user, not scan key code.

  • Thank you. I will be careful.

    It may make user(like me ) confuse if event setting is not match to character.

  • Should be possible a custom editbox with this plugin?

    like you can write stuffs with CAPITAL on or off, use Shift to make symbols, etc.. if so.. can u help me figure it out? ty

    edit: made it already ;D

  • Maybe I'm missing something simple here, but is there a way to map two inputs to a control?

    I am wanting to support both Keyboard and Gamepad input into my game, and whenever I set the presets to the joystick, keyboard functionality is lost.

  • No. One control, one input.

    So if you want to manage a primary & a secondary control, you have to create 2 controls for each "main" control.

  • There's a little mistake in expressions window.

    "Get last key down" and "Get last key release" should be in the keyboard expressions not mouse like they are now.

  • Another question. I have the controls currently loading from a preset configuration file. Later, I allow the player to change the control mapping, however, I don't want the changes to immediately go into effect. I want the system to hold the new changes and come into effect once the player confirms the changes.

    I thought I could record the new changes to a different player, but then I'm unsure how to get the controls of one player to then move to a different player. Is there something I'm missing or is there a better way to go about this?

    Edit: I think I have solved this issue. What I can do is record everything to player 2, then binary write it to a tempfile, but before the write I use a text manipulator to replace all instances of ",2," to ",1," then load that temp file.

  • There's an expression that's placed in the wrong category, "get last key down" is under the "mouse" category when it should be under "keyboard".

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • i use a scandinavian keyboard and i have to subtract one from the US keycode so 32 will be 31 etc.

    When i get the keycode from last key down however the keycode is wrritten according to a us layout!


Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)