In this section we will be using the base AI that ships with the GameSDK package and the death of this AI in the scene to create a kill counter in which we will increment a value and then print it to the screen. The logic is quite simple to understand: we need to be able to keep track of the Shooter and then pass this information on to a counter. This counter will check for the death of the AI entity and then print out the information on the screen once the value becomes 1.
This lesson will also take into account the Class of the Entity and show how you can differentiate between death to drive or separate the logic of factions and the way you reward the player. You can keep track of this through the Weapon info and passing the information of the target to the to a check that looks to see if the human class is being affected. If it does than you increment the GameToken variable only when it sees the Human and in this case not the Boid.
You need to follow these below mentioned steps to keep track of enemy kills: