Announcement

Collapse
No announcement yet.

How would you allow the player to bind keys?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How would you allow the player to bind keys?

    How would I get the key or controller input and where would I store the variable?

    #2
    I want to say that Rama made this available in his plugin. I would like this ability in blueprint as a standard feature myself.
    Map Generator 1.0
    Map Generator 2.0
    Map Generator 3.0

    Comment


      #3
      Since we cant add inputs dynamically, can't we add multiple inputs in the input list and disable / enable them dynamically afterwards (with a simple bool).
      [Released] Multiplayer Combat Editor
      A-RPG Sacred Swords
      Auto-Chess Live Development
      Youtube Tutorials

      Comment


        #4
        Yes but that gets extraordinarily complicated extraordinarily quickly.

        And frankly, it sort of makes you wonder what the POINT of InputEvents are (being that their whole purpose is to serve as keybind-agnostic, game-specific input commands) if they can't be rebound by the end user in a way less complicated than would be required with per-key-input bool switching.

        Unfortunately the best way currently available to BP is to use Rama's plugin
        Last edited by RhythmScript; 04-07-2015, 10:01 PM.

        Comment


          #5
          Originally posted by Yun-Kun View Post
          Since we cant add inputs dynamically, can't we add multiple inputs in the input list and disable / enable them dynamically afterwards (with a simple bool).
          You know, I guess it wouldn't be that hard to do it in blueprint. Just tedious at first, and if you ever have to tinker with it after setting it up.

          So how about:

          Each key event sets a variable. Lets say default variable A is 1, and variable B is 2. Each key event will be fed into a switch/enum, and you know that 1 is always going to fire X event and 2 is always going to fire Y event.

          You then make a function where the player can change default A to 2 and B to 1.

          Then you make a UMG menu widget where the player sees each event, say Fire Weapon, and the key that is assigned to it. Then they open the drop down menu, and instead choose a different key for the fire button. Really all they are doing is changing variable A to be a value of 2 instead of 1.

          So, you just have to set this up for each input of your device. For a controller will be a lot easier than the standard keyboard with 104 keys(or multiply that by 4 if you want them to be able to Ctrl/Alt/Shift everything).

          Some kind of built in blueprint node in the engine would obviously be preferable to this solution, but it should at least be feasible and practical for the average person to set up.
          Map Generator 1.0
          Map Generator 2.0
          Map Generator 3.0

          Comment

          Working...
          X