0 votes

I want to be able to write:

if (var) jumping == false:
    (disable Input.is_action_pressed("ui_up"):)

Is there a specific term I need to use, because I can't seem to find any solution.

in Engine by (12 points)
edited by

Why would you need to disable it? When you need to check for the input, you could have something such as if on_the_floor and Input.is_action_pressed("ui_up"): do_this (). That way, you could set on_the_floor when necessary.

1 Answer

0 votes

There is no special function for that, is part of the flow control that comes with the programming language (any).

Just do:

if not jumping:
    process your jumping Input

Check the kinematic character entry on the documentation and the demos for more examples.

by (7,900 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 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.