At the moment I have onAircraftDamaged working ok with aircraft that are in the game from mission start, but I can't get any response when an aircraft that has spawned in by a trigger/script is damaged.
Does anyone happen to know if it is simply not possible, or is it just that I simply need to adapt the code somehow?
I did try onActorDamaged too, but not as extensively as onAircraftDamaged so may have had something written wrong.
HTML Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using maddox.game;
using maddox.game.world;
public class Mission : AMission
{
public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);
AiAction Action = GamePlay.gpGetAction("trigger");
if (Action != null)
Action.Do();
GamePlay.gpGetTrigger(shortName).Enable = false;
}
public override void OnAircraftDamaged(int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft, maddox.game.world.AiDamageInitiator initiator, part.NamedDamageTypes damageType)
{
GamePlay.gpHUDLogCenter("Ping!");
}
}
Bookmarks