0 votes

it is working like same
and ,isactionjust_pressed is only one frame excution, can i use keycode for this?

func _process(delta):
    if Input.is_key_pressed(KEY_A):#キーコードで指定
        print("is_key_pressed")
    if Input.is_action_pressed("ui_down"):#インプットマップで指定
        print("is_action_pressed")
    if Input.is_action_just_pressed("ui_up"):#プロセス内でも1フレームだけ実行する
        print("is_action_just_pressed")
in Engine by (186 points)

1 Answer

0 votes

The effect is the same, but using actions you can make it flexible and configurable even at runtime (also bind many keys/buttons/etc to an action), while setting up a hardcoded key requires script modifications.

by (7,860 points)

thanks for comment,
i understand it!

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.
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 webmaster@godotengine.org with your username.