Objective And Blueprint Manager

I’m Trying To Check If All Enemies (AI) Have Been Killed Using An Actor Blueprint That Checks Every Tick If All Enemies In The AI Array Have The Variable [Dead] Checked.


The Seem Doesn’t Seem To Be Working Even From The Loop Body As Well.
I will Appreciate Any Response I Get To This.

1 Like

That’s not going to work, as you’re testing on the last ‘dead’ bool with the IF branch.

If you want to do it this way, you have to assume they are all dead, and then through to look for any that are alive. If you only find one alive, they’re not all dead :slight_smile:

1 Like

You need to get the amount of Ai that you have in the map to get do what you’re trying to do

1 Like

I Understood That I’m testing The Last Index Element If Its [Dead] , But Couldn’t Quite Put The Rest Of What You Said It Into Code.

I Tried To Use A (For Loop) Instead But It Just Gave Me the Same Results.
If You Could Show to Code This One Out For Me I’d Appreciate It.

Like this

Checking on tick is a really bad idea. It’s much better to do it on a timer ( shown ).

Every time you check, assume they are all dead, but if you find one alive, that can’t be right…

1 Like

Thaank You Soo Much,
I Really Appreciate That You Took Your Time Out Of Your Hands To Reply To Me,
Really Appreciate It :grin: :+1:

1 Like

No worries :sunglasses:

PS: you can stop the timer ( otherwise it goes on forever ), like this

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.