NPC which has a boolean object variable “Hostile”. There are several instances of this object in the scene.
A door that should be closed (let’s take just an animation switch for example) if there is at least 1 NPC that is marked as “hostile” by boolean, and open if there are none.
How can I check if there is at least 1 hostile NPC in the scene?
Hi!
If you need to check the value of a variable for each instance on the scene, then you need to loop over this object: For Each events [GDevelop wiki]