If you want to observer the individual ground actors use this:
Code:
public override void OnActorDestroyed(int missionNumber, string shortName, maddox.game.world.AiActor actor)
{
if (actor is AiGroundActor)
{
AiGroundActor groundActor = actor as AiGroundActor;
if (groundActor.Type() == AiGroundActorType.ShipTransport /* || groundActor.Type() == AiGroundActorType.ShipDestroyer || ... */)
{
GamePlay.gpHUDLogCenter("Ship destroyed");
}
}
}
If you are interested in the complete ground group (e.g. a column or tank group) use this:
Code:
public override void OnActorDestroyed(int missionNumber, string shortName, maddox.game.world.AiActor actor)
{
if (actor is AiGroundGroup)
{
AiGroundGroup groundGroup = actor as AiGroundGroup;
if (groundGroup.GroupType() == AiGroundGroupType.Ship)
{
GamePlay.gpHUDLogCenter("Ship destroyed");
}
}
}