So I think I got it working using this, thankyou.:
Code:
public class Mission : AMission
{
public AiActor thePlayerActor;
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
{
thePlayerActor = actor;
}
public override void OnActorDead(int missionNumber, string shortName, maddox.game.world.AiActor actor, System.Collections.Generic.List<maddox.game.world.DamagerScore> damages)
{
if (actor == thePlayerActor)
{
GamePlay.gpHUDLogCenter("Alas poor player, I knew him well... ");
} else {
GamePlay.gpHUDLogCenter("Death to the AI machines.");
}
}
}
My question that I'm still not sure on for what I'm trying to do, is how to determine if a pilot dies whilst bailing/having bailed? OnPlaceEnter means entry to the aircraft does it? If so, does OnPlaceLeave mean when they exit, so (if before landing) is bailing, or when they leave the mission/battle. Either way, how can I find if they bail, and the result of bailing (as sometimes the chute doesn't deploy)
I can use onAircraftLanded to determine a safe landing
I can use onActorDead to determine death by crash...
But how to denote if pilot bailed and alive or pilot bailed and dead...
Bookmarks