So theres this game that I really love called kingdom hearts and I really want to make the gameplay style just like it.
The only problem I have is, the combat. I know how to make FPS work with raycasting and Melee games with colliders and oncollision and ontrigger functions.
But kingdom hearts is a little different because its a constant barrage of combos and I have not made anything close to it yet
rather than a elder scrolls styled melee, or a fps type shooting game
now I already have some idea as to how i can do this but consulting with other people with more experience is a great idea.
heres a slow motion example
heres a battle thats not in slow motion
so My first idea is that, i could put a ray case at the tip of the blade or the center of the blade so if it swings if it hits something then it will do damage and send a message to the thing it hit using the send message function.
but then i thought, that the ray case is only cast in a single direction. what if the blade touched the enemy but the ray case didnt cast on them, it would cause a flaw. So I ruled that out.
The second thing I can guess is using triggers and no colliders
on trigger enter if the object is an enemy, apply damage and damage animation as well as play particle effects,
and make it only apply damage once for the attack duration.
EX:
if you swing, it will hurt them once via trgger, the blade will go through them but the trigger will apply damage and activate the damage animation, to hurt them again, you gotta hit the button and pull out your second combo, which will swing the sword differently
and you can do this in rapid succession only a certain number of times unless your combos get longer.
and if your combo becomes too long, your enemy could at some point break out of it with a type of barrier(collider) that will knock you away
or if theyre going to atttack you they become immune for a bit and attack
so there would be a state where they are vulnerable but when its time to attack they wll attack regardless of taking damage unless you can parry the hit
to do this, i thought putting two triggers would be good, but then i figured you could code it in where, if theyre in a state to attack, they cant use the damage animation
I hope this isnt confusing. I just wanted to consult with people about this.