Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2011, 01:55 PM
Storm of When Storm of When is offline
Approved Member
 
Join Date: Jan 2011
Posts: 93
Default Whats wrong here please?

Hi,
I added a couple of escort flights to a map I got from Ataros, they are missions 5 & 6 in the text, the bombers loaded and ran, but the fighters didn`t i`m guessing it`s a code error but I don`t really understant it tbh. Can someone see if anything obvious is in this?

using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
using part;
using System.Threading;
using System.IO;

public class Mission : AMission
{


public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
{
base.OnPlaceEnter(player, actor, placeIndex);
AiAircraft aircraft = actor as AiAircraft;

if (aircraft != null)
switch (aircraft.Army())
{
case 1:
if (aircraft.Type() == AircraftType.Bomber)
{ GamePlay.gpHUDLogCenter(new Player[] {player},"You should bomb tankers in Folkestone-Wissant. Цель-танкеры в Фолкстон-Виссан."); }
else { GamePlay.gpHUDLogCenter(new Player[] { player }, "You should cover bombers in Folkestone-Wissant. Прикрыть бомберы в Фолкстон-Виссан."); }
break;
case 2:
if (aircraft.Type() == AircraftType.Bomber)
{ GamePlay.gpHUDLogCenter(new Player[] { player }, "You should bomb tankers in Folkestone-Wissant. Цель-танкеры в Фолкстон-Виссан."); }
else { GamePlay.gpHUDLogCenter(new Player[] { player }, "You should cover bombers in Folkestone-Wissant. Прикрыть бомберы в Фолкстон-Виссан."); }
break;

}
}




public override void OnTickGame()
{

// loads the 1st sub-mission in 6 min and repeates it every 40 min.
if (Time.tickCounter() % 72000 == 10800) // 72000 = 40 min repeat. 10800 = 6 min delay.
// pls. note!!! the 1st figure above must be always larger than 2nd!
{
GamePlay.gpPostMissionLoad("missions/Trial/redships.mis");
// prints message on screen after mission load
GamePlay.gpHUDLogCenter("New allies ships in E6! Новые корабли союзников в Е6!");

}

// loads the 2nd sub-mission, etc. the same way
if (Time.tickCounter() % 72000 == 36000) // 72000 = 40 min repeat, 36000 = 20 min delay.
{
GamePlay.gpPostMissionLoad("missions/Trial/blueships.mis");
GamePlay.gpHUDLogCenter("New axis ships in I5! Новые корабли оси в I5!");

}

// loads the 3rd sub-mission
if (Time.tickCounter() % 27000 == 26999) // 27000 = 15 min repeat, 26999 = 15 min delay
{
GamePlay.gpPostMissionLoad("missions/Trial/redplanes.mis");
//GamePlay.gpHUDLogCenter("New allies planes in E6! Новые самолеты союзников в Е6!");

// сообщение через 1 минуту
double initTime = 0.0;
Timeout(initTime += 60, () =>
{
GamePlay.gpHUDLogCenter("New allies planes in E6! Новые самолеты союзников в Е6!");
});

}

// loads the 4th sub-mission
if (Time.tickCounter() % 27000 == 1800) // 15 min repeat, 1800 = 1 min delay
{
GamePlay.gpPostMissionLoad("missions/Trial/blueplanes.mis");
//GamePlay.gpHUDLogCenter("New axis planes in I5! Новые самолеты оси в I5!");

// сообщение через 1 минуту
double initTime = 0.0;
Timeout(initTime += 60, () =>
{
GamePlay.gpHUDLogCenter("New axis planes in I5! Новые самолеты оси в I5!");
});

}

// loads the 5th sub-mission
if (Time.tickCounter() % 27000 == 26999) // 27000 = 15 min repeat, 26999 = 15 min delay
{
GamePlay.gpPostMissionLoad("missions/Trial/redplanesesc.mis");
//GamePlay.gpHUDLogCenter("New allies planes in E6! Новые самолеты союзников в Е6!");

// сообщение через 1 минуту
double initTime = 0.0;
Timeout(initTime += 60, () =>
{
GamePlay.gpHUDLogCenter("New allies planes in E6! Новые самолеты союзников в Е6!");
});

}

// loads the 6th sub-mission
if (Time.tickCounter() % 27000 == 1800) // 15 min repeat, 1800 = 1 min delay
{
GamePlay.gpPostMissionLoad("missions/Trial/blueplanesesc.mis");
//GamePlay.gpHUDLogCenter("New axis planes in I5! Новые самолеты оси в I5!");

// сообщение через 1 минуту
double initTime = 0.0;
Timeout(initTime += 60, () =>
{
GamePlay.gpHUDLogCenter("New axis planes in I5! Новые самолеты оси в I5!");
});

}
}






}


Thx as always,
Smurfy.
Reply With Quote
  #2  
Old 11-10-2011, 03:17 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Maybe #4 and #6 have the same delay?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:41 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.