Hey all, I have been trying to figure out how to implement a system like what’s found in this video, using blueprints. I have a ranged system and an enemy ai that reacts to being shot, even added a custom “stagger” animation. Yet I haven’t figured out the qte side of this contact sensitive reaction and triggering the paired animations. Would love some assistance if possible. Thanks!
My high level approach would be to have a passive, always active ability on the player similar to how you would do interactions, perhaps it could even be part of an interaction system, that would regularly check for nearby Executions
Your enemy character would then somehow enable interaction with it when getting to a staggered state, so that your character would be able to find the available execution
Once found, perhaps the ability could then query the found target for available executions, could be gameplay tags container, or a map from tag to a struct that could contain information about the execution for that character, for example the montage to use
Then perhaps you could have data assets as definitions for the requirements of your executions
You can create Blueprints inheriting from PrimaryDataAsset, and they can have functions
So you can create a base execution data asset that has an EvaluateExecutionAvailable function that takes the player and the target as input and returns a bool based on its own calculations, for example if the player is behind the target, and then create subclasses for each execution type that you want to support
Once you have that, perhaps executions can also have a priority value to enable some executions taking precedence over others, such as in the video, where the backstab is higher priority than the uppercut
This data asset could also potentially have the player animation to play as a variable, so you can create your different types of executions by creating DataAssets (either through miscellaneous->Data asset or children blueprints of your executions) that simple have the data required, such as the animation to play
Your player can then have its own set of available executions, this time as a map from tag to the base primary asset type
The ability would combine all these together, find the mutual executions available (perhaps you have an execution for a very tall character that is not available for short characters) and combine them in a tag container, then go through all tags in it, and find each execution data asset in the player’s map, evaluate their conditions and priorities, and select one
Once the system selects an execution, you have everything you need:
Your player’s animation (can be found in the Data Asset that was selected)
The enemy’s animation (can be found through the enemy’s execution table)
I saw this blog post a while ago about paired animations that could be exactly what you need to do after all that to play the animations on both characters, properly synced and positioned
How to use the Contextual Animation Plugin in your Multiplayer Games (UE 5.3+) w/ Doğa - Devtricks (vorixo.github.io)
PS: Some of this could be simplified using Choosers, but I haven’t used them that much yet to say for sure or give hints