PDA

View Full Version : Has anyone got these to work?


Smokeynz
05-15-2012, 09:00 PM
I have been trying (unsuccesfully) to count stuff with respect to resource type management.I have been trying to use the internal codes to trigger counts but cannot get the following to register they are working even with simple counts each time they (should) activate.


Just wondering if anyone has got these too work yet?



public virtual void OnActorDestroyed(int missionNumber, string shortName, AiActor actor)
{
base.OnActorDestroyed(missionNumber, shortName, actor);
if (actor != null)
{
if (actor is AiAircraft)
{
ActorsDestroyedLast = ActorsDestroyed;
ActorsDestroyed++;
ActorResources(actor);
}
}
}


public virtual void OnActorDead(int missionNumber, string shortName, AiActor actor, System.Collections.Generic.List<DamagerScore> damages)
{
base.OnActorDead(missionNumber, shortName, actor, damages);
if (actor != null)
{
if (actor is AiAircraft)
{
ActorsDeadLast = ActorsDead;
ActorsDead++;
ActorResources(actor);
}
}
}


public virtual void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftLanded(missionNumber, shortName, aircraft);
if (aircraft != null)
{
AircraftLandedLast = AircraftLanded;
AircraftLanded++;
AircraftResources(aircraft);
}
}

public virtual void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftCrashLanded(missionNumber, shortName, aircraft);
if (aircraft != null)
{
AircraftCrashedLast = AircraftCrashed;
AircraftCrashed++;
AircraftResources(aircraft);
}
}


public virtual void OnAircraftKilled(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftKilled(missionNumber, shortName, aircraft);
if (aircraft != null)
{
AircraftKilledLast = AircraftKilled;
AircraftKilled++;
AircraftResources(aircraft);
}
}

FG28_Kodiak
05-15-2012, 09:24 PM
Äh you should override the virtual methods:

public override void ....

Smokeynz
05-15-2012, 09:49 PM
ahhh ahhhhh:grin: