Freeflow Combat blueprint System?

Hello everyone, I am currently making a project right now and I want to implement the same combat system that exists in the Batman: Arkham games: the freeflow combat system. Does anyone know how to create this system from scratch with things like auto-lock-on and traveling to the closest oppenent? Would greatly appreciate it.

Best Regards

1 Like

I was making the blueprints from this link:
https://forums.unrealengine.com/t/help-translating-unity-code-into-unreal-blueprints-for-free-flow-combat-system/677821/39
However I ran into a few issues.

Here is my code:


Here is a video showing what happened(or what went wrong):
2023-01-09 15-10-12.mkv (10.2 MB)

Here are the error messages that popped up after:

1 Like

@Mind-Brain I’ve seen you helping a lot of people with their problems and questions and I was wondering if you could help me create a freeflow combat system (based on the batman arkham games) from scratch on unreal engine 5 with blueprints. Would greatly appreciate it.

1 Like

Hey @Yamenisramen, welcome to the forums!

So you are getting an error and getting sent to World 0,0,0 because a new value for your jump location isn’t being set :slight_smile:
Simple enough to work through!

It looks like you aren’t getting any actors returned with your sphere trace. Make sure to make the trace visible for testing purposes.

What is going into your list of ObjectTypes to scan for? That seems likely to be the point of breakdown!

how do i make the trace visible

here’s “Object Types” as of now

So if this code is exactly what you had running in your video, you may want to make sure “IsAttacking” isn’t set to true, because you have the sphere trace set to be visible. Try putting a printString after the true branch saying “IsAttacking = True” to check for that! It seems like your trace isn’t running because that branch isn’t getting run.

And don’t worry, I’m not ignoring your other issues, it’s just that I’ve found doing things one at a time, focused, works everything out faster :slight_smile:

like this?

Yup! Just like that. Now give the game a run and see if you get that popping up on your screen!

If you have a button that makes you attack and set “IsAttacking” to TRUE, you will want to give that a press as well and see what happens.

It kept repeating the same thing: “IsAttacking = true”
2023-01-09 18-40-47.mkv (11.4 MB)

Ok! That did exactly what it was supposed to do! So we now know that IsAttacking is False before pressing the button, and therefore it is flowing through the FALSE part of the branch.

Let’s set the object type and see if that makes it visible. It may not be tracing because it has nothing to look for.

In your Object Types variable, at the bottom of the Details window, you’ll see that you can add an object type. I don’t know what your enemies are, but whatever they are you should add that to your object types list with the “+” button!

image

Edit: It doesn’t really have to be specific, you could use Pawn, Character, or BP_WhateverYourEnemyIsCalled

Sphere is visible now, but is it supposed to look like this?
2023-01-09 18-48-27.mkv (9.2 MB)

It is supposed to look like that! You should give it a try now with enemies!

Also, you may want to add an “IsValid” check after your attack input, with Target Enemy as what needs to be validated, then send “Valid” through and “NotValid” you can leave blank. This will keep you from launching if you have no target, which was what was making you go to world origin :slight_smile:

My character goes to the enemies now!
But now the problem is that my character sticks to the enemy after going to them.
2023-01-09 19-15-54.mkv (10.9 MB)

I think I see the issue for that. Right now it’s trying to go inside the enemy, you need your jump point to be sooner. Off of the Sphere trace use “out hit Impact Point” instead of Location, and give that a shot :slight_smile:

Did that. He still sticks to the character for a little while though as you can see here.
2023-01-09 19-38-32.mkv (14.9 MB)

I’m thinking that might be a timeline problem.

Can you shorten the length of your timeline? I suggest setting it to 1 second.

Go ahead and post the inside of your timeline once you’re done so we can take a look! :slight_smile: