I have an OnPlayerEliminated function that triggers correctly, and I’m trying to get the team of the eliminated player so I can decrement some variables. The victory check runs at the end, but it’s always false returning any of the team checks (and I’ve tried with the player on each of those teams). I’d appreciate any help!
OnPlayerEliminated(Result:elimination_result):void=
Print(“Player Eliminated”)EliminatedCharacter := Result.EliminatedCharacter if: EliminatedAgent := EliminatedCharacter.GetAgent[] then: if (GetPlayspace().GetTeamCollection().GetTeam[EliminatedAgent] = Team3): set Team3Alive = Team3Alive - 1 if (GetPlayspace().GetTeamCollection().GetTeam[EliminatedAgent] = Team2): set Team2Alive = Team2Alive - 1 if (GetPlayspace().GetTeamCollection().GetTeam[EliminatedAgent] = Team1): set Team1Alive = Team1Alive - 1 VictoryCheck(EliminatedAgent)