0 votes

I'm trying to add a menu for redefining the keys for my game, and found this documents page that gives me code for that, however, it doesn't work...

Here is my code:

func _input(event):
if buttonPressable:
    if takingInputs:
        if event.type == InputEvent.KEY:
            event.type = InputEvent.ACTION
            event.set_as_action(action, true)
            takingInputs = false
            buttonPressed = false
            buttonPressable = false

What am I doing wrong?

asked Sep 8, 2017 in Engine by Cobra! (167 points)

1 Answer

0 votes
Best answer

Nevermind, I figured it out, I followed this source code and that worked for me: https://github.com/akien-mga/dynadungeons/blob/master/scripts/controls.gd

answered Sep 11, 2017 by Cobra! (167 points)
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 How to use this Q&A? before posting your first questions.