How do I…
count the total of bullets that are shoot for one enemy
What is the expected result
I have two enemies of custom object, and I want to limit the bullets they shoot on scene, in this case 5 per enemy.
The bullets they shoot have an ID that link the enemy where they shoot before.
And when the enemy shoot, I start counting the bullets on scene to check if he can shoot again or wait until all the bullets are deleted.
What is the actual result
I still not get how to count correctly the bullets, and the enemy shoot like a rifle.
Related screenshots
Here I have one loop for PurpleEnemy, and inside If the conditions are true to shoot, I insert one loop for PurpleBullet (the type of projectile).
The logic is that if the bullet have the enemy id (that its set on creation, one step before) add one to the count.
And after finish set the variable BulletsCount.




