Announcement

Collapse
No announcement yet.

[Full Project] Rama's UMG Rebindable Key System, Rebind keys at Runtime!

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

    "Gamma" command works fine. It has 6 stages of brightness (0-5, 2 is default) and this is pretty enough for me.

    Comment


      Originally posted by Rama View Post
      The auto-rearranging happens in this part of the code, I believe:

      Settings->SaveKeyMappings();

      This is in UInputSettings

      I can't prevent Epic's code from doing this very easily

      Very nice to hear from you though!

      If you want to write your own implementation that doesnt re-alphabetize you'll want to look in InputSettings.h / .cpp





      Yup I'm part of the Solus team



      Rama
      I'm having issues with the alphabetical ordering thing too.

      Metahusk: A 501(c)(3) Creative Development Cooperative
      Projects | Forums | Repositories | Nonprofit | Donate

      Comment


        Is there a way to rebind a key on a specific index of the Axis/Action input by modifying the C++ function?

        Click image for larger version

Name:	justhtiskey.PNG
Views:	1
Size:	13.5 KB
ID:	1108019 Just this key for example

        Or does anyone have a way to bind on the same axis a keyboard key and a gamepad key ?
        Last edited by Crysux; 06-10-2016, 12:55 PM.
        French Game Designer - Game Designer/Prototyper
        Unreal Marketplace Assets : Options Menu Kit

        Comment


          I may have fix my problem, i'm sharing here two new function i made to add in your VictoryBPLibrary, they allow you to add axis and action input:


          For the Axis :

          to add in Header :

          Code:
          UFUNCTION(BlueprintCallable, Category = "Victory Library | Key Rebinding")
          		static void AddInputAxis(FName AxisNameToAdd, FKey NewAxisKey, float AxisScale);
          and in the cpp :

          HTML Code:
          void UVictoryBPFunctionLibrary::AddInputAxis(FName AxisToAdd, FKey NewAxisKey)
          {
          	UInputSettings* Settings = GetMutableDefault<UInputSettings>();
          	if (!Settings)return;
          	FInputAxisKeyMapping AxisAdd = AxisAdd.AxisName = AxisNameToAdd;
          	AxisAdd.Key = NewAxisKey;
          	AxisAdd.Scale = AxisScale;
          
          	TArray<FInputAxisKeyMapping>&Axi = Settings->AxisMappings;
          	Axi.Add(AxisAdd);
          	for (TObjectIterator<UPlayerInput> It; It; ++It)
          	{
          		It->ForceRebuildingKeyMaps(true);
          	}
          }
          For the Action :

          Header :
          Code:
          UFUNCTION(BlueprintCallable, Category = "Key Rebinding")
          		static void AddInputAction(FName ActionNameToAdd, FKey NewActionKey);
          cpp :
          Code:
          void UVictoryBPFunctionLibrary::AddInputAction(FName ActionNameToAdd, FKey NewActionKey)
          {
          	UInputSettings* Settings = GetMutableDefault<UInputSettings>();
          	if (!Settings)return;
          
          
          	FInputActionKeyMapping ActionAdd = ActionAdd.ActionName = ActionNameToAdd;
          	ActionAdd.Key = NewActionKey;
          
          	TArray<FInputActionKeyMapping>&Actio = Settings->ActionMappings;
          	Actio.Add(ActionAdd);
          	for (TObjectIterator<UPlayerInput> It; It; ++It)
          	{
          		It->ForceRebuildingKeyMaps(true);
          	}
          
          
          }
          Click image for larger version

Name:	newnodeunreal.PNG
Views:	1
Size:	63.1 KB
ID:	1108135
          French Game Designer - Game Designer/Prototyper
          Unreal Marketplace Assets : Options Menu Kit

          Comment


            Hi Rama ! Great job with your plugin But I got a problem. Why I can't have axis and action bindings in the same widget ? When I put them into the same widget via Wrap Box or Widget Switcher, I can only change action key bindings and axis don't respond to my key pressing. If someone know how to fix, it let me know

            Comment


              Thanks for this Rama, awesome job. I have a quick question. On my axis mappings, it dies not pick up the axis, for example, when i set my forward axis, its just gamepad thumb-stick left Up, not the axis. So if i move it down, it picks up : gamepad thumb-stick left down, not gamepad thumb-stick Axis. Any ideas where I am going wrong?

              Thanks, Shaun
              My Marketplace Items

              My Website

              My Unreal Games

              Comment


                Rama, this is great!

                Couple things though - your RemoveAxis/RemoveAction functions don't account for the fact a single key might be bound to several axes/actions and we might want to remove the bindings only on axes/actions specified in struct passed to function. And you really should integrate those AddAxis/AddAction nodes - the whole thing is incomplete without them.

                Comment


                  Any chance of making the keybind system independant from victory plugin?. Ty
                  Discord: https://discordapp.com/invite/WmQ3pDR
                  Youtube: https://www.youtube.com/channel/UCkQVJmcV-szXTIySHz4CILw?
                  Twitch: https://www.twitch.tv/alfffffffffff

                  Comment


                    your download is 4.10, will this update cleanly to 4.12?

                    Comment


                      Two questions:

                      1) Will this work in 4.13/4.14?

                      2) Why in the world hasn't Epic implemented this kind of functionality in the engine itself??? Madness!

                      Comment


                        Rama Key Rebinding 4.15

                        Dear Community,

                        I've updated my Key Rebinding full project to 4.15 for oyu!

                        I include the relevant version of Victory Plugin now, so I am using media fire instead of the wiki:

                        Wiki Download Page ( prior versions )
                        https://wiki.unrealengine.com/File:R...s.zip#Versions

                        Direct Link:
                        https://www.mediafire.com/?ewfq9xl7y9taw5d

                        Enjoooy!



                        Rama
                        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                        ♥ Rama

                        Comment


                          Originally posted by Rama View Post
                          Dear Community,

                          I've updated my Key Rebinding full project to 4.15 for oyu!

                          I include the relevant version of Victory Plugin now, so I am using media fire instead of the wiki:

                          Wiki Download Page ( prior versions )
                          https://wiki.unrealengine.com/File:R...s.zip#Versions

                          Direct Link:
                          https://www.mediafire.com/?ewfq9xl7y9taw5d

                          Enjoooy!



                          Rama
                          Hey Rama

                          Thanks for your project but I have some problems. I can't set the new key to be a gamepad key or axis. Any way to change that? ^^

                          Comment


                            And there is no Deprecated Set Input mode UI only :/

                            Comment


                              Dear Rama, how difficult it would be to create "default input settings" button? In case of user doesn't want to rebind each button manualy to its default value.

                              Thank you for your hardwork.

                              Comment


                                Originally posted by Skypillows View Post
                                Dear Rama, how difficult it would be to create "default input settings" button? In case of user doesn't want to rebind each button manualy to its default value.

                                Thank you for your hardwork.
                                Check out CardinalMenu https://forums.unrealengine.com/show...w-Friends-List

                                The menu system has gotten a bit complicated, but it works. You can modify CardinalMenu's Set Default Input method and use it in your own game.

                                Metahusk: A 501(c)(3) Creative Development Cooperative
                                Projects | Forums | Repositories | Nonprofit | Donate

                                Comment

                                Working...
                                X