I am working on a small project and had a question about team score. I have the following code:
Code: Select all
function ScoreKill (Pawn Killer, Pawn Other)
{
local Pawn p;
local TeamInfo bestTeam;
local TeamGamePlus teamGame;
local int index;
super.ScoreKill(Killer,Other);
teamGame = TeamGamePlus(level.game);
if (Killer.bIsPlayer && Level.Game.IsA('TeamGamePlus'))
{
for (index = 0; index < teamGame.maxTeams; index++)
{
if ((bestTeam == none) || (bestTeam.score < teamGame.teams[index].score))
{
bestTeam = teamGame.teams[index];
}
}
if (Killer.PlayerReplicationInfo.Team == BestTeam.TeamIndex)
{
//do something here. code not written yet
}
}
if (NextMutator != none)
NextMutator.ScoreKill(Killer, Other);
}
Thank you in advance for the help!
S9