# Check if all actors of a class have set value to true

**URL:** <https://forums.unrealengine.com/t/check-if-all-actors-of-a-class-have-set-value-to-true/490702>\
**Category:** Audio\
**Tags:** unreal-engine, looping, UE4-26, Blueprint, question\
**Created:** [November 8, 2021, 12:12am UTC](https://forums.unrealengine.com/t/check-if-all-actors-of-a-class-have-set-value-to-true/490702 "2021-11-08T00:12:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdhDyslexie](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/adhdyslexie/32/953987_2.png) [@AdhDyslexie](https://forums.unrealengine.com/u/AdhDyslexie)\
**Post date:** [November 8, 2021, 12:12am UTC](https://forums.unrealengine.com/t/check-if-all-actors-of-a-class-have-set-value-to-true/490702/1 "2021-11-08T00:12:11Z")

</div>

Hello

I’m trying to check for all actors of a class in level. And if actors are \>= 1 which is to say there is at least 1 actor of class in level, to then loop through all actors of check if IsDead bool is set to true, and if all actors return true to then set new Variable as true and then to move onto next event

 ![351784-ue4-bp-temp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/1/ca1165a9f72eb724287b3cb4c7590369e636600d.png)

This is what i have so far any help will be appreciated

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [November 8, 2021, 6:44am UTC](https://forums.unrealengine.com/t/check-if-all-actors-of-a-class-have-set-value-to-true/490702/2 "2021-11-08T06:44:45Z")

</div>

I usually do it the other way around: assume they are all dead (set All Dead bool to true), and then check if there’s any alive yet. If at least one is alive, stop the loop execution and proceed with your functions.

 ![351791-dead.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/9/579e69e5f9e97b878c6758ea828fd1de01199618.png)
