I saw an example in the Team Elimination Game tutorial where you create a hashmap and loop through each team and store the players for each particular team to its own hashmap. I think in this case, you could create an array of players for each team and then set that array on a hashmap with “1” as the key for team one, etc.
Print("Beginning to populate players")
for (Team : Teams, TeamPlayers := GetPlayspace().GetTeamCollection().GetAgents[Team]):
var PlayerMap : player_map = map {}
for (Agent : TeamPlayers, TeamPlayer := player[Agent], FortCharacter := Agent.GetFortCharacter[]):
if(set PlayerMap[TeamPlayer] = 0, WeaponTier := PlayerMap[TeamPlayer]):
Print("Assigned Player to PlayerMap with Tier {WeaponTier}")
FortCharacter.EliminatedEvent().Subscribe(OnPlayerEliminated)