Thanks for the help.
I think this resolve the question. So far no multiple spawns.
Code:
bool stopFlag = false;
.
.
.
public override void OnAircraftDamaged(int missionNumber, string shortName, maddox.game.world.AiAircraft aircraft, maddox.game.world.AiDamageInitiator initiator, part.NamedDamageTypes damageType)
{
if (shortName.Contains("BoB_LW_Wekusta_ObdL.000") && stopFlag == false)
{
AiAction Action1 = GamePlay.gpGetAction("Aspawn");
if (Action1 != null)
Action1.Do();
stopFlag = true;
GamePlay.gpHUDLogCenter("Got that Boch!");
return;
}
}
or
Code:
bool stopFlag = false;
.
.
.
public override void OnAircraftKilled(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftKilled(missionNumber, shortName, aircraft);
if (shortName.Contains("BoB_LW_Wekusta_51.000") && stopFlag == false)
{
AiAction Action1 = GamePlay.gpGetAction("Aspawn");
if (Action1 != null)
Action1.Do();
stopFlag = true;
GamePlay.gpHUDLogCenter("Got that Boch!");
return;
}
}
Bookmarks