Using get all actors of class in a box collision (multiplayer)

Hey everyone, I have been trying to fix this bug in a multiplayer project of mine but I can’t seem to get past it.

That image is in the level blueprint. To put it basically, when the event is called to choose a person who will be it, I get a random person and then have a branch to check everyone from the box collision (check for last one standing) this takes up the entire map. If the person is in that boundary then they are set as it and so on. If they are not in the boundary then call the event again. When a player dies they are sent to an area outside the box collision. This system works fine aside from one thing. If the server starts out as it, then dies. When this event is called again the server for some reason is it again even though they are not in the box collision. I can’t seem to figure out why this happens. If anyone needs more information on any of the workings please let me know and I will be happy to show you.

Hey, I tried to rebuild your bp so it makes more sense for me, in your example, you are getting all Actors of Class and then check if a random one is inside or not. this can be done in a simpler way by just getting all overlapping actors of Class from the Box Trigger and then get a random one from that result, check the 1st picture.

also in my example, I created a BP with a Box Trigger inside of it, this should still work the same in the Level BP.
but to keep it dynamic I would suggest you use a BP instead, imagine you want to create a new level then you will have to copy all of that code and paste it in the new level again.

Question 1. What is the Purpose of the function at the end where you set a bool to true on every Character?
Question 2. What happens when a character dies, do you reset “is it” or “someone is it” or does the Character gets destroyed and you just spawn a new one?

Ok so for the first question, I am setting everyone to someone is it so that certain events play for everyone but there isin’t a problem with that.

For the second question, when a player dies they are just teleported to a area outside of the map and their camera view is switched to an area to spectate the map, is it for that player is reset and so is someone is it, then the event runs again once I do what I had to do.

I have just tested your strategy for the get overlapping actors and it works now. Not to sure how I overlooked the get overlapping actors but yeah. Thanks for the help!

Cool happy that I could help, I’m gonna repost this as an answer so you can set it to Solved :slight_smile: