0 votes

The plugin works very well, but i don't know how to use remap.find_duplicates()

func find_duplicates() -> Array:
var dupes: Array
print(dupes)
for action in ACTION_LIST:
    var key1 := get_action_key(action)
    if key1:
        for action2 in ACTION_LIST:
            if action == action2:
                continue

            var key2 := get_action_key(action2)
            if key2:
                if key1.scancode == key2.scancode:
                    dupes.append(action)
                    break

for action in ACTION_LIST:
    if action in dupes:
        continue

    var button1 := get_action_button(action)
    if button1:
        for action2 in ACTION_LIST:
            if action == action2:
                continue

            var button2 := get_action_button(action2)
            if button2:
                if button1.button_index == button2.button_index:
                    dupes.append(action)
                    break

return dupes

https://github.com/KoBeWi/Godot-Input-Remap

Godot version 3.4.3
in Engine by (33 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.