Code: Select all
function ScoreKill(Pawn Killer, Pawn Other) {
if (Killer == None) return;
if (Killer != Other) {
if (Killer.IsA('ScriptedPawn')) {
BroadcastMessage(Killer.GetHumanName() @ "killed" @ Other.GetHumanName());
}
log(Killer.GetHumanName() $ " killed " $ Other.MenuName);
}
Super.ScoreKill(Killer, Other);
}
a) when I, as the Player, kill a ScriptedPawn; and
b) when a ScriptedPawn kills another ScriptedPawn.
It doesn't broadcast a message in either case, which is not a big issue.
What I want to do is log when I, as the Player, am killed by a ScriptedPawn. What code do I need to do that?