Update
Been doing some "debugging" with a squadie who works in the field and now we're both scratching our heads.
We've implimented a gpHUDLogCenter Message just to see if the triggers are actually meeting thier requirements. They definately are and this begs the question why those three flights aren't spawning. This has us both stumped.
Code:
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
//base.OnTrigger(missionNumber, shortName, active);
{
GamePlay.gpHUDLogCenter(string.Format("Mission {0}, Name {1}, Active={2}", missionNumber, shortName, active));
}
//Triggers for RAF actions
//Report Examples
//SendScreenMessageTo(Allies, "Message to Red");
//SendScreenMessageTo(Axis, "Message to Blue");
if ((shortName == "LW_Spawn_7A") && active)
{
AiAction action = GamePlay.gpGetAction("LW_Spawn_7A"); //TriggerName
if (action != null)
{
GamePlay.gpHUDLogCenter(string.Format("We have action {0}", action.Name));
action.Do();
}
}
if ((shortName == "LW_Spawn_7B") && active)
{
AiAction action = GamePlay.gpGetAction("LW_Spawn_7B"); //TriggerName
if (action != null)
{
GamePlay.gpHUDLogCenter(string.Format("We have action {0}", action.Name));
action.Do();
}
}
if ((shortName == "LW_Spawn_7C") && active)
{
AiAction action = GamePlay.gpGetAction("LW_Spawn_7C"); //TriggerName
if (action != null)
{
GamePlay.gpHUDLogCenter(string.Format("We have action {0}", action.Name));
action.Do();
}
}
We are getting messages stating the trigger number, name and its active status so now we know that the actual trigger is firing and getting passed through to action.Do(). Still, the aircraft tied to those triggers aren't spawning at the airfield. I figured it might be a problem with the airfield itself (spawn points) and tested with air starts. No luck.
Frustrating to say the least.