Shuffle FFA Teams
31,530 Views
-
using { /Fortnite.com/Devices } using { /UnrealEngine.com/Temporary/Diagnostics } using { /Verse.org/Random } using { /Verse.org/Simulation } ffa_shuffle_teams_device := class(creative_device): @editable Button:button_device = button_device{} # Selects a new team for every existing player. # Each player will be assigned to another team different from their original one. # This is meant to be used in a Free For All game. ShuffleTeams<public>():void= TeamCollection := GetPlayspace().GetTeamCollection() Players := GetPlayspace().GetPlayers() # The algorithm starts by shuffling the teams in random order. # Teams is a variable because we'll remove a team each time we assign a player to it. # There's one player per team in a FFA, so once a player is assigned a team, the team isn't # available anymore. var Teams:[]team = Shuffle(TeamCollection.GetTeams())
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.