Hi I’m trying to make a mafia / town of salem game mode and I’ve got almost no experience coding.
I know you can set the team max size with the already existent devices but I’m not sure how it assigns teams. essentially its 15 players max. where its 1 mafia member for 5 - 7 players, 2 for 8 - 10 players, and 3 for 11 - 15 players. While the rest of the players are town or the special roles.
Not sure if there’s any way for me to make sure this is how the teams are assigned but would love any suggestions. Pretty much I’d like to be able to do two teams. Mafia and Town.
Also is there anyway to make it so the players can see what “class” they are (Sheriff, Doctor, Townsfolk, and Mafia)? As well what’s the best way to assign the extra roles (sheriff and doctor) they’d still be on the Town Team. I’ve got Townie, Doctor, Sheriff, and Mafia. Eventually I’d like to add more and I’m sure I’ll be back with more questions but this is it for now.
If you want 1 mafia member for 5 - 7 players, 2 for 8 - 10 players, and 3 for 11 - 15 players. I have a suggestion for you ^^ (I do not know if this is the best or optimal way to acheive that, but hope this suggestion helps).
Place a trigger device and make sure it triggers everytime a player spawns. If you need 2 mafia for 8-10 players, go to the option in the trigger called ‘transmit every X trigger’ and put the value to 8.
That means everytime a player spawns on the spawn pad it will send a signal to the trigger, but the trigger will only send a signal to the next device when atleast 8 players are spawned because u put the value to 8. So, when 8 players spawned it will send a signal to a new device which will make 2 players the mafia. For 11-15 players put another trigger which will send a signal when 11 players spawned and will also disable the other triggers which activates when 8 or 5 players are spawned. I know this sounds complicated but make sure u read it slowly to understand this. My bad for being so bad at phrasing words but this is the best i could come up with.
I’m not sure if there is a way to make players see their class but when there is a way that you can change their team name to ‘mafia’ or ‘townsfolk’, so, when they open the scoreboard, they can see their team name as what u set them to be.
The way you can do this is by using a ‘team settings and inventory’ device. Set one team name as mafia and set the other team name as ‘townsfolk’ and make mafia spawn in the team called mafia and rest in the townsfolk.
Note: make sure ‘team size’ in the settings is set to ‘Dynamic’ (so you can freely manipulate the number of people on a team the way you want)
hey thanks for the team thing ill have to test that out when i get home. would i just not use it if theres only 7 people? also my question about the class thing is like the townsfolk team will also include th special roles. i suppose i could just give the respective classes say an item to signify it. you wouldnt by chance know how to randomly include them in would you? one member of the town team would be sheriff and another doctor
First of all, It all depends on whether u want to let your players choose their roles or assign them classes by default when the game starts automatically. So, I can suggest you an method accordingly maybe
what I need is when the game starts it to keep the rule of one team 2 member if there are 5 - 7 total players. two team 2 members if there are 8 - 10 total players, and three team 2 members if there are 11 - 15 total players.
for now within team 1, I would like to have three separate classes if possible the more common would be just plain Townie they don’t get anything special. i would also like there to be one doctor and one sheriff.
so for example if there were 9 players in the game this is how i’d like the player to be
There’s an exampe on assigning players to teams in verse Team Multiplayer Balancing
Additionally, island settings> teams set to “team index” (I’m writing this from memory) sets your team count to that number but as I’ve learnt in other thread, when player enters game is auto added to team1 and you can change the assignment with verse
Hey there! I work on UEFN documentation. If you want to let a certain class know what they are, use the Class UI device to set up messages for special classes. That can include telling the player what class they belong to.