I’m making a Battle Royale game and I was wondering how you could make it so that only a certain amount of players can jo!n or less. Thanks for considering.
A live player counter, when counter reachings the limit, maybe?
Maybe. Is this thing a counter?
Yeah it is a counter.
The All Important Player IDs
Use player ids. Make a block that runs for all players at the start, using a relay and lifecycle, that makes all players with x+ player id spectator, with a team switcher.
Could you maybe use images? And you can’t jo!n in late.
You can go in settings to change whether or not late players j oin as spectators, so what you can do is have a certain amount of players to start by using a zone and a counter, then once it reaches six it activates a trigger that will change all j ion late players to spectators.
For example, have the player counter set to have a target of six, and once it reaches that target it sets all j oin late players to spectator.
But in the game, you can’t come in late.
Er… Zone over spawn pad increase when player enters zone, target of six, transmits on a channel that starts the game.
Yeah. But the counter has to reach six, and then the game will start. After that, if anyone else j oins. They will automatically become spectators. Does that work?
Actually, have it update a property, then use block code to compare that property with a number. That number is six. Then, if it is less than or equal to, the game starts. Run this code at game start. If the answer is ye, the a the game begins. If no, it returns an error message.
But can you make it that less people can jo!n and that the game will start?
To do this:
- Make the team settings cooperative.
- Make team switchers switch a random person on team one to another team, up to the number of teams as you want max players.
- Set a relay to all players to specific team (Team 1) and set them to spectators.
This should work!!!
But this is a Battle Royale game. There are two teams and they fight!
I edited my answer, use block code to do a comparison and then return on a channel if it works.
I mean I just don’t get it. People need to use images these days!
And I don’t have anyone else with me. How would I test it out?
This is the block code, use a zone to I creas a counter and then the property.
Sorry, it should be equals or less than I think.
Okay. The amount is actually four on each team, but do you need to do more than the block code?
Yep, just place a zone right over spawn and set it to transmit to a counter when a player enters. Then, connect that to the property. Also, have it run the code on game start, using a lifecycle. So it would instantly check as soon as everyone had loaded in and then either start the game or send an error message, you choose!
Do you mean spawn pad?