Animation based Hitboxes

I’m currently trying to make a game. My end goal for the game is for it to be a Tactical First Person Hack&Slash with base building (basically Bloodborne’s style of hack&slash mixed with Chivalry’s mechanics, Rainbow Six’s planning phase+squad control, and X-COM’s base management), however for now i’m focusing on the hack&slash mechanics first, and then after that’s done i’ll deal with the strategy part. But i have a couple of questions to ask regarding melee hitboxes :

1.How do make it so that a hitbox does damage depending on the speed of the animations ?
2.How do you bound a weapon (and it’s hitbox) to a character ?
3.Do i need to code in pain states separately for every enemy ? Or can i just make a universal pain state code (that includes things like dizzies and poise calculation) and then apply it to everyone ?

I’d be grateful if i can get answers on the questions by simply using blueprint and not needing C++, but i wouldn’t mind coding for C++ (i suck at it, but i’ll learn).
Thanks.

Welllll

Your asking a lot of complex connect the dot questions in one go that relates to an engine that is modular in design. There is no simple answer as for each question there is more than just one way to do it.

The better root is to ask one question at a time and ask what are your options.

  1. Hit boxes don’t do damage and can only determine that a collision has occurred based on a definable event and almost anything can be used to evaluate what kind of collision has occurred, including a material.
  2. Depends. Is it a pick up or a weapon in inventory or is a prop that the player will always be using? If something simple like a staff that the player will always be using , or something they always have in inventory, then you could add it as a component part of the Character BP and toggle it on and off as to use.
  3. Assuming that you will be using something like a Character BP you can create a custom variable for each character that could be global in nature but still local as to individual character behavior. Pain for example can be handled by the character and a “global” blueprint used to cast to each character to see what state they are in.

The big tip though is to use paper and pencil and draw out the logic of how you think it should work as what you draw usually translates to the Blueprint flow that you need. It’s one of thous being able to see the tree for the forest things. :wink:

I’m sorry, i’m still new at this and i don’t want to be shouted “we’re not making your game”

Anyways, for no 1, i can either code fixed damage every time the hitbox of the weapon touches the enemy, or i can code in a system that calculates damage based on the speed of the hitbox ?