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.
Just so I get this right you have setup a custom box collision that does the level transition correct?
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
Well in a way,when the player touches the trigger box it opens Level and makes the gye go to the other level
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
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.
could i maybe get more info on how i could do that? im new to UE4
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.