View Single Post
  #6  
Old 04-18-2011, 09:06 AM
doghous3 doghous3 is offline
Approved Member
 
Join Date: Apr 2011
Posts: 168
Default

With that mission, I take it the sub-mission didn't load.

The issue is with void OnTickGame().

You used back-slash instead of forward-slash. The syntax error would in this instance prevented the rest of the script to run.

So with the changes below, it will work.



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(); }
});
}

}
Reply With Quote