View Single Post
  #2  
Old 11-13-2012, 04:45 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

First do you have set
MissionNumberListener = -1;
example:
Code:
    public override void OnBattleStarted()
    {
        base.OnBattleStarted();

        MissionNumberListener = -1;
    }
Second if you create an actor and you want a trigger like TGroupDestroyed attached to the actor you must create the trigger after the spawn of the actor.

Third i don't know how you use OnActorDead, but for me it works without a problem.

Code:
            public void ActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> damages)
            {
                if (actor is AiAircraft)
                {
                    // code for aircrafts
                }
                else if (actor is AiPerson)
                {
                    // code for pilot or gunner kills (if needed)
                }
                else if (actor is AiGroundActor)
                {
                    // code for destroyed groundactors
                }
            }
Reply With Quote