# How to keep track of enemy death

**URL:** <https://forums.unrealengine.com/t/how-to-keep-track-of-enemy-death/370105>\
**Category:** Editor Scripting\
**Tags:** arrays, spawn, wave, unreal-engine, question, Blueprint\
**Created:** [September 11, 2016, 4:11pm UTC](https://forums.unrealengine.com/t/how-to-keep-track-of-enemy-death/370105 "2016-09-11T16:11:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_ba946294](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ba946294](https://forums.unrealengine.com/u/anonymous_user_ba946294)\
**Post date:** [September 11, 2016, 4:11pm UTC](https://forums.unrealengine.com/t/how-to-keep-track-of-enemy-death/370105/1 "2016-09-11T16:11:16Z")

</div>

Hello,

I am trying to set up a spawning wave system and in order do to that I would need to set up a system that keep track of the number of death of enemies. So far I have a system that work using integers and implementing the integer (+1 )everytime an enemy dies.

The system is based of the toturial to spawn.

- I have one spawner with a custom event called spawning. It has a timer by function executing the spawning function and spawning ai at a location with a define number of enemies.
- The game mode (event begin play) execute a function getting all the spawner and telling them to execute the function spawning with a timer
- The ai character calculates damages and fires an death count with an integer created inside the game mode and implements it
- The game mode check if this number of death equals number of enemies and if yes - will fire second wave.

I am wondering if there is a better way to go using arrays to keep track of number of death. I tried to use get actors from class - length - remove from index but did not seem to work.

If anyone has done that before or knows a better way to do that is modular and easy to use for waves?

Thanks again

here are the screenshots

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ba946294](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ba946294](https://forums.unrealengine.com/u/anonymous_user_ba946294)\
**Post date:** [September 11, 2016, 4:13pm UTC](https://forums.unrealengine.com/t/how-to-keep-track-of-enemy-death/370105/2 "2016-09-11T16:13:55Z")

</div>

![106548-gamemode+get+death+count.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/c/0/cc0a8e2a649c052e917548071423c8d8477177fb.png)
