Lecture Mini Challenge! Make TP Character Aim and Shoot!

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 :slight_smile:

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 :slight_smile:

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 :slight_smile: however I willl leave the video up with that implementation so you are aware of the OnPossessed event :slight_smile:

likeso2

Hello Flipshock
can advise me what can I do if I want Health bar would be in the corner of screen for FPCharacter and for TPCharacter above of his head

Privacy & Terms