I can't seem to add a value to the map type variable.

You’re checking “if(CurrentTeam = 1)” which will never succeed, because CurrentTeam is an instance of the team class, not an integer like “1”. If you want to find the index of the team (and btw the first team is 0, not 1), after getting the CurrentTeam you’ll need to do TeamIndex := GetPlayspace().GetTeamCollection().GetTeams().Find[CurrentTeam].

I recommend writing a line at the top of the OnBegin that’s something like TC := GetPlayspace.GetTeamCollection() so your code is easier to read and write.

1 Like