August 2019
Intermediate to advanced
380 pages
9h 17m
English
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. We want to ensure that the counter tracking the player's current ammo count reduces by one each time the player fires a shot. The Blueprint scripting required to do so looks like this:

Find the final node in the chain, ...
Read now
Unlock full access