I'm trying to determine if when an aricraft/actor is shot down if the player was involved.

My thought is that the onActorDead provides the actor that died, but also a list of damage initiators and the score and time for each of these? I seem to be able to count these from the 'list' but am stuck trying to loop through the list with a 'foreach'. I have never used a C# list before so might be totally wrong on what I'm attempting.

So count works, I think:

Code:
 public override void OnActorDead(int missionNumber, string shortName, maddox.game.world.AiActor actor, System.Collections.Generic.List<maddox.game.world.DamagerScore> damages)
    {
        
        Console.WriteLine("" + shortName + " is dead actor");


            Console.WriteLine("Count " + damages.Count);


    }
But if I try this to hopefully go through each score value (I actually intend to check the initiators if one is the player but am trying to just start with the score values as practice on getting something from the list):

Code:
  public override void OnActorDead(int missionNumber, string shortName, maddox.game.world.AiActor actor, System.Collections.Generic.List<maddox.game.world.DamagerScore> damages)
    {
        
        Console.WriteLine("" + shortName + " is dead actor");


        //Console.WriteLine("Count " + damages.Count);

        foreach (double s in damages)
            Console.WriteLine(s);


    }
I get an errror in the script compiler saying: Cannot convert type 'maddox.game.world.DamagerScore' to 'double'

but if I see correctly in my object browser the DamagerScore method is like this: public DamagerScore(maddox.game.world.AiDamageInitiator i, double s, double t)


Am I even close? Is there an easy way to check if a dead/killed/destroyed aircraft(actor) was damaged by the player?