x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to get all enemies dead within radius?

Hello everyone! how i can do when only all enemies are dead in radius to get branch work? i have a bool trigger, and getting all actors of class and each loop makes only the first dead shoot the trigger, how i can make when only all bools are true get branch work? here is screen of my setup. alt text

Product Version: UE 4.9
Tags:
bp_screen.png (185.1 kB)
more ▼

asked Feb 19 '16 at 09:06 PM in Blueprint Scripting

avatar image

Dino zavr
78 6 7

avatar image rjvm Feb 19 '16 at 09:23 PM

create a overlap sphere an get all overlap actors.

avatar image Dino zavr Feb 19 '16 at 09:31 PM

i know about that, i mean make the branch work only when all enemies dead, not one of them.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Just initialize a variable to true and if a single one is not dead, set it to false. some sudo code:

bool AllDead = true;

for each actor in get all actor

if not dead

AllDead = false

break

more ▼

answered Feb 20 '16 at 12:33 AM

avatar image

Rarp7
105 11 12 22

avatar image Dino zavr Feb 20 '16 at 01:11 AM

It works! Thank you very much mate, i spend few hours trying to resolve this! never knew it was so simple.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question