So I decided to do a little “mini” challenge which was to achieve the fact that a player could aim and not aim down the sights as well as fire with the proper animation when inputs were pressed. I also set health bars to be color coded to players and enemies.
Here is the end result: https://youtu.be/ovSAKRu6B_A
PS: In your TP_Animation Graph make sure in your Anim_Fire event which gets fired from the animation itself FIRST checks if the actor has an enemy tag which means it is an AI controlled pawn and ONLY then fire. Otherwise on your player you will get TWO fire actions
PPS: OBS window capture does not capture sub windows so you won’t see me bind the fire input. Sorry! This will be fixed for later mini challenge videos
EDIT:
Heh I forgot we had tags. I refactored it to not use the AI BP to determine color for the HealthBar and just used the Enemy tag on BeginPlay which is much more extensible and creates less dependencies or rather a more generic one however I willl leave the video up with that implementation so you are aware of the OnPossessed event