Download

What happens in a Trigger volume when there's multiple objects in it?

What happens when multiple players walk into the same trigger volume? Does each player trigger an enter and exit? Is there a way to ask if the volume is occupied by one or more players? I need to know so that I can open and close an automatic door appropriately.

If you set the action to trigger only once (there’s a node for that), it will only trigger once. It’s impossible for all the characters to walk into the trigger at the exact same time so the first one in will trigger it. Pretty much all game engines can catch events down to the millisecond.

I know players won’t enter at exactly the same moment. But I’m wondering what happens when more and more players begin to occupy/leave the volume. I need a reliable way to check that the volume is empty of players.

Events will trigger each time an actor enters the volume. So if you have 2 or 3 players walk into a trigger volume, the OnOverlap (if I remember the name correctly) event will be triggered for each actor. So what you would want to do in the blueprint for the trigger volume is first ensure that the actor entering the volume is a player. If it is a player, have a counter variable that increments when a player enters the volume and decrements when a player leaves the volume. If you want to check to see if the volume is empty, just check that variable.