Freeflow Combat blueprint System?

Yeah I think I got it thanks!

1 Like

Fixed it. Turns out that I just forgot to set a value for apply damage :sweat_smile:

Alright, last question for the day(although I don’t need it answered today by any means :sweat_smile:)
Is there a way to increase the length of the sphere trace?
In the video below, I turned the visibility on and if I’m too far then I can’t reach the enemy so is there anyway to increase the length of the trace?
Also I just wanted to say that you’re an actual life saver, and thank you so much.
2023-01-10 23-21-09.mkv (13.5 MB)

No worries! Yeah it’s this node riiiight here:
image

Make sure to change the X and Y together! 100 = 1 meter. So right now it’s 10 meters. :slight_smile:

Thank You!

Another snag I’ve run into:
If I attack an enemy multiple times then the orientation of my character goes completely out of wack. Do you know of a solution for this?
2023-01-11 21-26-38.mkv (19.2 MB)

Try this:


It grabs the Z of the hit actor and guarantees the jump location to be exactly the height of the enemy you’re attacking :slight_smile:
If you’re lost, you can right click: Break Struct Pin to get most of these things

Worked like a charm! thank you so much! Very excited to keep working on this!

@Mind-Brain one thing I would like to incorporate is for my character to remain locked onto an enemy until the trace lands on another enemy that way I can fix the issue of nothing happening if I’m aiming in between two enemies.

Hey again @Yamenisramen!

I covered that in that other thread, basically a ball around the character, so if you point in a direction that doesn’t hit, it grabs the nearest one.

Another thing I would suggest is turning up your “Radius” on the first sphere trace (the one you already have) to something like 250 or 300. That should keep you from missing the enemy unless you aim in more or less the complete opposite direction. :slight_smile:

I think I did it correctly! I attack the nearest one now. Thanks!

Is there a way I can edit the trace to where enemies who have just gotten attacked can’t be detected by the trace for a few seconds? Because the current issue right now is that once I attack an enemy, I want to turn and attack another enemy, but the problem is that because I just attacked the previous enemy, I’m right next to them meaning they’re in my radius. Because of this even though I’m facing another enemy, my character still ends up attacking the enemy that just got hit because they’re still in my radius due to me being right next to them after landing a hit on them. I’m thinking I can fix that by making it to where the trace can’t detect an enemy after being hit for a few seconds, but I’m not exactly sure how to do that.

Hey again @Yamenisramen!

Okay, so we’re gonna need screenshots now. I need to know what order things are happening in your targeting code! Because if your line sphere is coming before your big self-sphere, it should take priority. Which would allow you to point elsewhere. So your self-sphere should only go off if targetEnemy=null.

Right! Here’s my trace code


So as it is currently, you’re not using your second sphereTraceForObjects at all:

image
It’s making a trace but you’re not doing anything with it. Which means your original trace might be too large, and is reaching behind you :grimacing:

Thanks for that! I set all the out-hit outputs and it made the trace actually do something :slightly_smiling_face:
But, is there a way I can make it to where a pawn can’t be traced for a few seconds after getting hit? That way, in practice, if a pawn is knocked back then he can’t be hit for a short time.(Since it wouldn’t make sense if I was able to hit him while the pawn’s getting knocked back)

Okay… so there’s a way to do this but based on what we’ve done so far it’s going to be tricky. So we’re going to put a boolean on your enemies, let’s call it targetable.

When an enemy gets hit, on their “On any damage” you need to turn that bool FALSE and start a “Set Timer By Event”. After that timer, Set Targetable = True again.

Now on your player character, after your sphere trace, you’ll grab your targeted enemy and cast it to whatever your enemies are called. Drag off that cast, and “Get Targetable”, then use a branch to check if true. If true, attack. If False, end it. :slight_smile:

Thanks! I’ll try it out

@Mind-Brain could you check this for me?
EnemyBP:


CharacterBP:

Close! Good try!

More like this though:

1 Like