Assigned prison cells
-
When A player joins the game and they select the “prisoner” team they will be randomly assigned a cell and when they die they will always respawn in that cell.
-
I know this is done in many games like Jailbreak, Madcity, Bloxburg, ect… But how can this be done?
-
What I have thought to do so far is when the player joint the prisoner team a script will pick a random number (1-10 for example) and then check if the spawn is still available and if so it will assign that player to that team spawn and then mark that spawn as taken. When all the spawns are taken the game will mark the team as full.
Later after this works I am thinking of letting the prisoners customize their assigned cells, this will also save and load when the player leaves and rejoins the game/team. It will always reset to default when the cell is unoccupied.