Code:
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
if ("Rommel_Car_Dismount".Equals(shortName) && active)
{
GamePlay.gpGetTrigger(shortName).Enable = false;
/// get the aircraft group ("BoB_LW_Wekusta_ObdL.01 30") spawn in, takeoff, follow waypoints action
AiAction action = GamePlay.gpGetAction("Rommel_Plane");
if (action != null)
{
action.Do();
/// create a new trigger
Timeout(10, () => {
ISectionFile sfTrigger = GamePlay.gpCreateSectionFile();
sfTrigger.add("Trigger", "Rommel_Plane_Destroy", "TGroupDestroyed BoB_LW_Wekusta_ObdL.01 30");
GamePlay.gpPostMissionLoad(sfTrigger);
});
}
}
else if ("Rommel_Plane_Destroy".Equals(shortName) && active)
{
/// Do what must be done ;-)
}
...
Bookmarks