Hey there!
I’m trying to plot out a game structure which includes features like Dashing, Attacking, and getting Stunned.
Suppose we have the following situation:
1 → Player 1 Begins Attack Animation
2 → Player 2 Begins Attack Animation (with lil delay)
3 → Player 1 Hits Player 2
4 → Player 2 Also Hits Player 1 (with lil delay)
Now, logically, the 4th step should not even take place. I can handle the backend for this by labelling Player 2 as ‘Stunned’ after the 3rd step and then ignore Player 2’s attack request.
Problem is, I don’t know how to reset the Animations, clean up the VFX, reset Velocity, Disable BodyGyro’s etc; like resetting everything that took place during Player 2’s attempt at attacking which failed.
// In games like Black Magic II, I can't help but notice how their Guardbreaks, Parries, Superarmors and Immunities work so well at cleaning up after the player who got countered.
I’ve considered StateMachines and have worked with them in the past, but I don’t know how far they will get me.
EDIT : I forgot to mention, I’ve learnt the Knit framework, so if anyone wants to talk specifically about that, please don’t hesitate!