FIGHTING GAME - How to throw a fireball and power moves?

In the above video you will see I have the character throwing a fireball, the animations and sound in place. But this is just off one input.

I want to have the classic fighting game technique if the other player is on the right you need to press down, down right, right and then the punch button to throw a fireball? The buttons have to be in sequence, first the down, and then the down right, and then the right simultaneously with the punch button to perform the fireball. And this also is timed and must be done within a certain window of time. I figured I would start with the simple quarter cresent fireball motion before trying more complex power moves like dragon punches.

Does anyone have any tips or links or suggestions here? I will see what I can come up with.

:point_up_2: :point_up_2: :point_down: :point_down: :point_left: :point_right: B A = fire?

1 Like

With Enhanced Input system, you can make input actions which use combos of other actions.

2 Likes

I was able to finally get it to work, using just a bunch of branches and detecting what inputs are being pressed.

For the sake of debate: i would have opted to simply get the dot product to determine what side is forward at the moment of the input and feed that to the buffer system.

Dunno if I’m reading this wrong, but bunch of branches for a single ability reads that there is no buffer? There is also a chance that holding :arrow_lower_left: / :arrow_lower_right: will return true for both :arrow_down: and either :arrow_left: / :arrow_right: . So in theory with the function above the fireball should work just by holding :arrow_lower_left: / :arrow_lower_right: + button.

1 Like

Seems you are right, I just tested it and was able to just

Although I do not understand why this does not work, we first check if down is pressed, now the next brand checks either down and right or down and left, and the next branch check if either left or right is being pressed simultaneously with a punch button. So then that must not be working sequentially then. I would greatly appreciate it if you could lay out some nodes and or further explain your ideas on a solution, thanks.

For those getting stuck @ 49 seconds, the author fails to show on screen where the node is located, its under input / input mapping context.

But I followed the vid as well as I could but I can’t get it to work. I created 4 input actions, IA_Down, IA_DownANDRight, IA PressRightANDFaceButtonLeft, and Fireball and an Input mapping context.

And then inside the context file (again shame on Epic for not giving us a screen shot tool)

— I see I had nothing on index 2 but when I corrected it, it still did not work — Any help is appreciated thanks.

Inside the character bp

To be clear I have no experience with fighting games. With that out of the way this is how I would approach the problem.


Mechanically sticks are actually 4 switches:

     Down
Right     Left
      Up

The only way you can trigger diagonal inputs is to trigger two perpendicular switches. That means that for :arrow_lower_right:, both :arrow_down: and :arrow_right: are true. This is why just holding :arrow_lower_right: worked in your bp.

In Street Fighter for example: for the dragon punch (:arrow_right: :arrow_down: :arrow_lower_right: + p) :arrow_right: :arrow_lower_right: :arrow_right:, :arrow_lower_right: :arrow_down: :arrow_lower_right: and :arrow_right: :arrow_down: :arrow_right: are also valid. It’s because the combination of 3 inputs :arrow_right:, :arrow_down: and :arrow_right: are true within a given time. And since :arrow_right: is true within :arrow_upper_right: you can even :arrow_right: :arrow_lower_right: :arrow_down: :arrow_lower_left: :arrow_left: :arrow_upper_left: :arrow_up: :arrow_upper_right: + p and will count as valid.

There are also games like Street Fighter 3 that only expect :arrow_right: :arrow_down: :arrow_lower_right: + p and don’t allow shortcuts. It’s up to what you want.


It’s not that simple.

Curious to see how far Input Combos (Enhanced Input) will take you. Using Street Fighter as an example: when right is forward i can :arrow_right: :arrow_down: :arrow_lower_right: + p for a skill, but :arrow_right: :arrow_down: (other player crosses) :arrow_lower_left: + p is also valid because at the moment of the input both :arrow_right: and :arrow_left: were forward. This leads me to believe that what is buffered are not literal inputs, but commands created in a given context.

If Input Combos can be made to work like that then awesome!

1 Like

Bump for more attention and opinions on this.

@Everynone Do you have any idea how to do fighting game style power moves (fireballs, dragon punches, yoga flame) in blueprints? Thanks.

1 Like

Seems like there’s a ton of good info here. What isn’t working? EI handles this out of the box, no?

Perhaps it can, I personally do not know enough about enhanced inputs either way to give an opinion about them. Thanks for checking out the thread EN.