Download

Axis Mapping not being removed blueprints

I tried to rebind the keys for movement (using “Input key selector” in the UI) in different ways but I ran into some problems. Each time I removed the input file for a clean run (by default W forward, S backward, the only values for “MoveForward”). At the end of the chain I have “Save keys mappings”.

The first way I tried to do it, is by first removing the current values and then adding the new ones, but using the bellow blueprint I ran into the first problem, it doesn’t remove all the elements from the array. S was removed, but W is still in the array. T and G were the new values.


AxisMappings=(AxisName=“MoveForward”,Scale=-1.000000,Key=G)
AxisMappings=(AxisName=“MoveForward”,Scale=1.000000,Key=T)
AxisMappings=(AxisName=“MoveForward”,Scale=1.000000,Key=W)

Then I though, why remove them in the first place just to add a step in plus, why not simply set new values on each position from the array, but unfortunately it doesn’t seem to work, the keybinding aren’t changing. By doing this it would have been easier for me later to show those keys in a UI because I knew on position 0 I would have forward and on position 1 backward.

Because this didn’t work either, then I came with the following solution that worked but it is not something that we should do because it adds more steps then it should have. First go though the array and remove elements that have scale of 1 and at the end add the new value. After this, go again though the array and remove the elements that have scale if -1 and at the end add the new value.


Is there a way to make the second solution work, the one where you aren’t removing the values but only changing them on each position with a new one?