Basics to a Fighting Game System [Hit Reaction Help]

I have searched a lot for this topic and have came up short…

Looking for a little help to get me in the right direction so far I have a two characters on screen (same blueprint), a camera that follows both characters on a 2d plane, and I have a punch animation set up.

xWhat I’m trying to do is get the punch to reaction to the other character on screen.

I was able to get this working with a Anim Montage with a get player character but this only makes it so second character will reaction on player 1’s punch…When controlling player 2 when I punch player 1 the reaction will play on player 2 lol

I know this is maybe one of the main games people are wanting to make with UE4 if I can get this working good I’m willing to share what I have so far

Hi :slight_smile:

You’re saying you have 2 characters, are you running 2 clients in the same time ? Or are you spawning 2 player characters ?
If last option is what you did, consider doing the first option.

Then, once you run 2 clients with their own character, start looking at networking and replication.

If you have no clue what is is about, you can watch these videos.

If you’re already aware of the basic network rules, your “Get Character Controller [0]” and “Get Character Controller [0]” should always give you the local player if cast on CLIENT.

I’m just trying stuff local right now having a create player inside the level blueprint

With the play anim montage node I can only select get player character unless I’m missing something

If I have time tomorrow I will review what you posted and report any progress if any

You are right, you don’t necessarily need Networking for a Brawler Game.

Try using “Get Pawn Owner” in your Animation Blueprint rather than “Get Player Character”. That gives you the reference to the Pawn currently using the Animation Blueprint. If you were using Variables / Functions (as I’m guessing you are) located in your Player Character, you might need to use a “Cast to” node (Cast To your Player Character BP) after your “Get Pawn Owner”.

Well I’m not trying to add this within the Animation Blueprint but the Character Blueprint by calling a On Component Overlap node then having that point to the Animation Montage node then setting the desired reaction for when my hitbox overlaps the capsule component

then using Get player character in the target wire but as I said before this cause player 1 to only work Vs. Player 2

I’m sure there is a better way of doing this just trying to get pointed in the right direction

I do in fact have what you are talking about in my Animation Blueprint with a Cast to defining my bool variables

On Event Overlap: Get overlapping actor (usingthe output from Overlap Event) and cast your Damage Event to it (you might need to Cast to your “Character BP”).

The initial attack event could take in the owner of the attacker and on overlap can compare overlapping components to verify theyre not owned by the attacker.

Well the main thing I’m trying to get is what to place in the target wire on the play anim montage using get overlapping actors won’t work for target since it’s target is character

Just to say I’m new to this and I understand what you mean but the route to take in the engine is what I’m looking for