Can we not just load a mission from the main script and then use a destroy script like this to remove the train: train.miss and train.cs
Code:
AiGroundGroup[] groups = GamePlay.gpGroundGroups(RED);
foreach(AiGroundGroup g in groups) {
if (g.GroupType() == AiGroundGroupType.Train) {
if (g.Name().Contains(NAME[i])) {
AiActor[] actors = g.GetItems();
foreach (AiActor a in actors) {
((AiCart)a).Destroy();
}
Code:
public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
{
base.OnActorCreated(missionNumber,shortName,actor);
//ships will die after 55 min when counted from their birth
if ((actor as AiGroundActor).Type() == maddox.game.world.AiGroundActorType.Ship)
Timeout (3300, () =>
{ if (actor != null)
{ (actor as AiGroundActor).Destroy(); }
}
);
}
Bookmarks