x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Custom Action Mappings Don't Work in Packaged Game

Let me try to explain this issue, so here's a part of my script that DOES work:alt text

As you can see, when a new key is selected from umg input key selector, I first remove the active binding, add the new one, then save it all to the Input Project Settings. The stuff after that is for my save file so that the right key displays on the UI, but I'm 99% sure thats not where the issue comes from. Also note that the Axis Mapping "MoveForward" is a default axis mapping.

alt text

Now this line of script DOESN'T work. It is the exact same as the script above, except it's a different input key selector, and a different axis mapping, "MoveBackward" which isn't a default axis mapping.

Now here's where it gets weird. When I play in the editor, the script on the bottom does exactly what it should, changes the keybinding to Move Backward, no problems at all. When I package my game for Windows 64, however, the "MoveForward" key remapping still works, but the "MoveBackward" one doesn't. This issue applies to all my custom keymappings, both axis mappings and action mappings. The only difference I can think of between the two is that MoveForward is keymapping that already exists when the project is first launched, while MoveBackward I made manually.

One other thing to mention is that the default value given to my custom mappings does work in the packaged game, but they won't change.

So is there a solution to this? Do I Have to completely rework my mappings and stuff? If you know please share, and thank you.

Product Version: UE 4.19
Tags:
capture.png (137.6 kB)
captudre.png (112.9 kB)
more ▼

asked Oct 13 '18 at 01:21 AM in Blueprint Scripting

avatar image

Noodle King
10 2 1 2

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Alright after some messing around I fixed it. Instead of getting a copy of the Axis Mapping By Name node, I plugged it through a For Each Loop node. Then, I added a function to reset all progression in the built game, essentially deleting and remaking the save file. This combination solved my problem, all the keybindings work exactly as they should now!

more ▼

answered Oct 13 '18 at 05:56 PM

avatar image

Noodle King
10 2 1 2

(comments are locked)
10|2000 characters needed characters left

I'm in the same problem. It doesn't work on standalone but on viewport, yes.

alt text

In standalone the "Remove Action Mapping" and "Add Action Mapping" don't work.

Please, can you explain how did you make the file?

capture.png (512.1 kB)
more ▼

answered Oct 14 '18 at 11:12 AM

avatar image

WodOdin
6 1

avatar image Noodle King Oct 14 '18 at 05:11 PM

So from what I can gather, the script you posted looks fine, should work no problem. Plus if it works in the view port, then the script can't be the problem. I got mine to work by adding a function to delete and re-create the save file that is associated with the standalone game. I found that after I had reset everything, the bindings worked fine. This fix was literally "turn it off then back on again," but it worked. So if you have a save system set up already, try recreating a save slot and seeing if that works.

alt text

alt text

Also note that after I delete that save file, another one is automatically created after the level restartsalt text

capture.png (80.2 kB)
sdf.png (58.7 kB)
asdasda.png (103.6 kB)
(comments are locked)
10|2000 characters needed characters left

My problem is the "Save input Mapping" and "Add action mapping" nodes don't save to "DefaultInput.ini" in Standalone mode but reads them. In viewport mode saves correctly and I don't know why.

I see that you use "save game" node to save the bindings no?.

more ▼

answered Oct 15 '18 at 08:26 AM

avatar image

WodOdin
6 1

avatar image Noodle King Oct 15 '18 at 09:40 PM

This is the weird thing. I have all the bindings saving into the Default Input Settings, not my save game. I think what it comes down to is after you package your game, some stuff gets left over from the last build in the DefaultInput.ini. If you can create a new, fresh DefaultInput.ini, then all the keybindings should work as intended. Now this is just me guessing, but when I delete my save game, for some reason it also deletes the DefaultInput.ini, then recreates it once the level restarts. Id try it, in theory it sounds like the save game and DefaultInput.ini aren't connected, but its how I got it to work so its worth a shot.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question