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 can i make my Box Trigger not available when there are AI in the level and when they are all dead The Box Trigger Becomes available

So im doing a arena type game where you need to kill all the AI inside the level to go into a another Level via box trigger,so im trying to find out how can i disable the box trigger when the ai are alive and be available when they are all dead.

Product Version: UE 4.12
more ▼

asked Aug 03 '16 at 04:30 PM in Using UE4

avatar image

1 1

avatar image Erasio Aug 03 '16 at 04:44 PM

Just so I get this right you have setup a custom box collision that does the level transition correct?

avatar image EnemyRedHawk Aug 03 '16 at 05:23 PM

Well in a way,when the player touches the trigger box it opens Level and makes the gye go to the other level

avatar image poplockentaco Aug 03 '16 at 04:46 PM

Easiest way would be to use a boolean that only lets you pass when it's true. When all the AI are dead the boolean would be set to true so you could pass. You wouldn't have to spawn a tigger box or anything like that. Just a branch after OnOverlap to check if all AI are dead and then you can pass. If you can provide some more info about your game and how specifically you are trying to implement this functionality, then we can all help you better. Thanks

avatar image EnemyRedHawk Aug 03 '16 at 05:27 PM

if you know a game called binding of isaac,the way you enter the level and it closes all the doors and when you kill them all they open them selves so you could get to the other level or go back to the one you were

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

You could make your own Spawn Manager class. Make an entrance trigger volume parameter, and bind the overlap event in the spawn manager to spawn a bunch of units (also settable via parameter or data table). Track the life of the enemies within the spawn manager and when they all die fire an event that enables your end action.

more ▼

answered Aug 03 '16 at 05:33 PM

avatar image

1.2k 31 8 40

avatar image EnemyRedHawk Aug 03 '16 at 06:30 PM

could i maybe get more info on how i could do that? im new to UE4

avatar image Shohei Aug 04 '16 at 12:37 AM

Assuming you are using blueprints, create a new one with AActor as the parent. Add a trigger component of any shape. In the blueprint graph, drag the trigger component onto the graph and from that drag to create a Bind to Component Overlap node. From there you can spawn your enemies using the SpawnActor node.

At this point you can do all sorts of tracking. When they all die, fire off a custom event that does whatever you need to do.

This concept extends to a lot of trigger requirements. You can probably extend TriggerVolume directly instead of AActor and achieve the same result.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users


You could also use the GetAllActorsOfClass node and check each AI if they are dead

alt text

Hope this is helpfull :)

checkaliveai.jpg (151.1 kB)
more ▼

answered Aug 04 '16 at 02:20 PM

avatar image

1.2k 24 18 53

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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