Hmm so this is what I was thinking:
First, I have to setup different types of hitboxes on the character, then program them so that if the opponent’s attack collides with a certain hitbox, X happens.
Second, I’d add collisions that are tied to different sockets/bones of the character so that when the character attacks, those collisions are enabled and then disabled after the attack is finished. This is used for activating the collision check on the enemy’s hitboxes when these socket collisions come in contact with the enemy’s hitboxes during an attack.
I’ve already started on the second step, but I’m unsure of how to add hitboxes to the character. Like I know how to add collisions, but I don’t know how to add them depending on what state the character is in, i.e. Idle, Attacking, Blocking, Crouching, Jumping, etc. I think I have to add the collisions into the actual animations of the character but I have no idea how to do that. All I know is how to when he is in his default state. I know how to do it in theory but I don’t specifically know how to add hitboxes to certain areas of the character depending on what he is currently doing, in UE4. I assume I’d be using a state machine. I’ve got one setup but that’s only for my punching and kicking animations.
…am I making sense? I’m not an expert on fighting games, so it is hard for me to think of how they work in terms of programming.
I’ve looked at this question, and I’m trying to follow ScottSpadea’s advice, but I don’t know how: 2.5D fighting game - Programming & Scripting - Epic Developer Community Forums
This is what I’ve done so far for the second step:
Please help