- Edited
Hello there,
I am currently busy with a tutorial on how to make a Tournament Fighter game but sadly I'm stuck.
I know how to make a Combo System and I already have ideas on how to make code more generic for every possible fighter within your game. Yet I can't get my head around receiving Inputs as a String.
With everything that I've tried, I only got as far as having an "integer" or weird long text describing in debug code what it needs to be.
What I want is an actual LETTER or WORD that is pressed, after which it can be stored within an Array which is then sent to a Dictionary as a KEY for the corresponding COMBO.
Here is a list of things that I've tried to get to the thing I want:
func _input(event):
if(Input.is_action_just_pressed("AnyKey")):
usedKeys.append(event)
func _input(event):
if(Input.is_action_just_pressed("AnyKey")):
usedKeys.append(event.as_text)
I tried entering the InputMap after a press was done and using that to get the correct input inside my array
And there are some other things that I have done to make this work. But became stuck again looping back to the issues I had before.
I also searched around the Internet for a definitive answer and did spot a forum post, which sadly would make my code no longer generic.
PS: I do know about the video of PigDev but it became really complicated after a short while