Free Flow Combat System help

That is what I meant, yes! But we can’t know for sure until you go into your test level and give it a go! :wink:

Give that a test and see what else could use some fixing!

unfortunately the same thing is happening

Okay, so we’re going back to the “hurt animations play for enemies not being punched” thing, sounds good!

So the next thing you’ll want to do is do something to let us know what enemy is being targeted. My guess to what is happening is: based on your inputs, it’s switching target after the attack animation, but before the damage is going out.

On your sphere trace for objects, you will want to activate your Draw Debug (only for a SHORT time so we don’t fill the screen forever with them) see pic:
image

You are no longer getting that error code, though, correct? Let’s verify things before moving on!

yes, I am not getting the error message any longer!

Great to hear!

It looks like you have the debug lines turned on, great! Now right under where you turned those on, let’s reduce the time they show for and make the lines smaller so we can see what the enemies are doing when you’re punching around! :slight_smile:

like this?

Oh no! No, what you did was shrink the size of the sphere trace. You’ll definitely want to reset that- that’s your detection. We can work with it now that the duration has been reduced if you change the radius back. Let’s work with these settings at the bottom of the sphere trace:
image

Now what you’re trying to do is to see if you are activating punch, targeting another enemy, and making that enemy you are now targeting but didn’t punch is doing its hit animation. If you can figure that out, you have your problem, and you have to know the problem to solve it! :slight_smile:

Okay!, I shortened the draw time to 1, and I’ve noticed that the player will attack the same enemy even if targeting a new enemy, I don’t know if this is a separate issue or one that could possibly be causing a different enemy to react then the one that is getting hit

So if you watch the stream of text from the printstring (this is why we set this up! :smiley:) you can see that the target is NOT changing when you angle away.

We can also see from the debug lines that the sphere trace is colliding with the enemy you are next to before continuing on. Red lines mean “haven’t hit anything yet” and green lines mean “There was a hit before this point”, so when you turn around and it’s almost all green it’s because it already has its target.

Now that we know this, let’s get into the code!

Bring back the code for the player character, but make sure it’s readable so we can follow it along. If there isn’t anything noticeable, we can figure something out. Maybe add the Target Enemy variable to the list of ignored actors on hit or something. But this is a spacing issue, for sure.

Okay!, here’s my code






Hey @somerandomguy181! Sorry for the late reply!

Would you possibly mind making these overlap a little more? And kind of try to put them in order a little better? I’ve tried to make sense but when I hit the edge of a photo it’s kind of hard to follow. Try to give some overlap so there’s more of a reference point!


my character is teleporting out of thirdperson template when check the error log its targeting here i dont where did i do a mistake can anyone please help me with this

What error are you talking about? Invalid variables? Access none property? Also, are your questions related to this subject? I would suggest you create a new topic if it’s not related.

@56legion is right, @Surajjatin2006!

Go ahead and make a new post as this is not applicable to the thread, and bring as much specific information as you can that you think applies to the issue! :slight_smile: