Bliss, Colander & ATAG mission builders,
ALERT! See video of MrX & others landing at enemy bases
http://www.youtube.com/watch?v=FSywx...ayer_embedded#!
Can you please impliment a script in ATAG missions to prevent landing at enemy bases as a matter of urgency (example below).
public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
{
base.OnAircraftLanded(missionNumber, shortName, aircraft);
#region landing at enemy base not allowed
foreach (AiBirthPlace bp in GamePlay.gpBirthPlaces())
{
double CircleRadius = 1000.00;
if (Math.Sqrt(Math.Pow((bp.Pos().x - aircraft.Pos().x), 2) + (Math.Pow((bp.Pos().y - aircraft.Pos().y), 2))) <= CircleRadius)
{
// landed within 1km of an airbase
if (bp.Army() != aircraft.Army())
{
// landed at enemy base so penalise the player
sendScreenMessageTo(aircraft.Army(), "Landing at base " + bp.Name().ToString() + " is not allowed", null);
destroyPlane(aircraft);
}
else
{
Timeout(60 * DestroyLandedAiAfter, () => // wait DestroyLandedAiAfter min
{ destroyPlane(aircraft); }
);
}
}
}
#endregion
}
Bookmarks