is difference between is_key_pressed and is_action_pressed only the difference keycode and inputmap?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bgegg

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

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

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.

thanks for comment,
i understand it!

bgegg | 2019-05-05 01:46