To get our UI to respond to the player interacting with the environment, we need to modify the Blueprint scripting that controls the player and targets. To begin, let's get the ammo counter to decrease when the player fires a shot from their gun.
Tracking the ammo and eliminated targets
Reducing the ammo counter
We need to modify the player fire logic so that the ammo counter is decreased when the player fires their gun. The Blueprint nodes managing the firing of the player's gun are contained within the FirstPersonCharacter Blueprint. Find this Blueprint within the Blueprints folder of Content Browser and open it. Now, find the large series of Blueprint nodes contained within the Spawn projectile comment block....