Counting actors with array inside the game

array index return’s the index of the item in the array, it goes from 0 to number of elements -1
so for an example you have an array with Apple, Potato and a Cabbage, apple will be 0, Potato will be 1 and Cabbage will be 2, if you want to know how many elements are in the array you drag the array and type “get length”, in your case you want to play the sound if the length =0 (if there’s nothing in the array), i’ve also answered you in the other question, you will se a code to do it there.

Hi,

I am trying to count how many actors are spawned inside my level and and when all of the actors with a set tag are destroyed from the level only then will it play a sound.

I currently have 5 enemies that spawn inside my level with the tag EnemyAi and when they are all destroyed then i want a sound to be played.

I have tried setting it up and and linked it from when the last EnemyAi is spawned and currently nothing happens when i kill all the enemies.

Here is how far I have gotten, i am still a beginner with blueprints so please bare with me :slight_smile: if any more info is needed please let me know!

Hi,

thank you once again, you have helped me greatly :slight_smile:

It’s all fixed and working perfect now!!

Here is a screenshot incase other people have the same question :slight_smile: