How do you get areas to be locked off depending on the number of players?

I am trying to get my game to lock off the other players bases if they are not in the game.

1 Like

Uhh… what do you mean?

My game has 4 bases and I have only 2 players mostly play and I need the other two bases to be blocked off when the players on that team are not there.

1 Like

Check with player IDs?
And get the number of players.
So then, if number of players is less than 3, then assign player 1 team 1, player 2 team 2, and block off the rest. And if there are 3 players, then block off team 4. Otherwise, then you can just do whatever.
I have no idea if this even works.

Alright I will give up

1 Like

I got this
Four teams
Four spawn pads
Each spawn pad spawns a diffrent team
Trigger on top of the spawn pad opening the barrier of the base
If no one spawns in a place, it wont open

1 Like

Using a live player with tracked property could make it where if there are more than 2 players than area will be blocked off with a barrier, connecting a repeater and a checker could work, would you like me to make a guide for you on this?

Ian’s method would be easier to make. You place a trigger at each base spawn and if a player activates the trigger it activates the base. If the trigger isn’t activated it will keep the barrier around the base preventing it from being used.

What if a player joins late?

It will still work, simce they will be put on an empty team
And the trigger will still be able to be triggered

2 Likes

Or if you want you could make later players into spectators. However, the triggers would still be active, so later players won’t be a problem.

1 Like

I found the guide, with one repeater that connects to a checker that checks for a value that is greater than 2. The repeater would need to be connected to a lifecycle that transmits when “game starts”. It could possibly work. The Trigger idea that Ian made is definitely way simpler though.