Directional attacks.

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

I’m making a Metroidvania, and I want that my character can do down attack on air.
I want something like “Link Down Air” on Smash Bros, but idk how to code “press two keys” to do it.
I’m using GDscript
Help me pls

:bust_in_silhouette: Reply From: yikescloud

You can try detect the input key in process:

func _process(delta):
  if(Input.is_action_just_pressed("attack"):
    if(Input.is_action_pressed("ui_down:):
      down_attack()
   else:
      normal_attack()