I must be doing something wrong...i have added the script to one of my maps and there is even a .cs file of the same name but when i tested it and spwned four planes they just took off like they always do

is the file below correct?
Quote:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;
public class Mission : AMission
{
public override void OnTickGame()
{
{
if (Time.tickCounter() % 1200 == 0)
{
GamePlay.gpPostMissionLoad("missions\Multi\Dogfigh t\basic40c.mis");
}
}
}
public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
{
base.OnPlaceLeave(player, actor, placeIndex);
Timeout(1, () =>
{
AiAircraft CurAircraft = player.Place() as AiAircraft;
AiAircraft PrevAircraft = actor as AiAircraft;
if (CurAircraft != PrevAircraft)
{ (actor as AiAircraft).Destroy(); }
});
}
}
|