Trying to make a random dungeon crawler where upon colliding with the collision box it will spawn the next room from a list of rooms that have doors that do the same. I keep getting this error and it pops up in different places like instead of it being “Hallway 3” it is one of the three branches. The other hallways that are being spawned are almost identical to the one in the pictures, the only difference is what it can spawn. Also there are times when I will run it that the newly spawned collision boxes will not trigger when I move to them and stand inside of them. With the prints at the end I occasionally get several numbers at once as well, I am not sure of the cause.
Maybe try switching your code round. Try calling just one event and use a Switch on int with your random number.
Probably when you spawn a new hallway it starts overlapping the existing one which triggers OnComponentBeginOverlap that spawns a new hallway that again starts overlapping the existing one and so it continues. Set collision settings on your Box component to OverlapOnlyPawn and it should work.
I did for the first hallway but forgot to do it for the others, the issue has seemed to clear up for now, I appreciate the help.
This didn’t fix my issue but it does seem to be a better way of going about what I’m trying to accomplish, thank you for your help.