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 05-02-2012, 01:48 PM
Storm of When Storm of When is offline
Approved Member
 
Join Date: Jan 2011
Posts: 93
Default Help!!!! please

Hi,
Could one of you really clever chaps edit this file so that all the actors are cleared at the end of each map, I`ve tried to write the correct text in but have failed miserably. Thx.



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 12 min and repeates it every 80 min.
if (Time.tickCounter() % 144000 == 21600) // 144000 = 80 min repeat. 21600 = 12 min delay.
// pls. note!!! the 1st figure above must be always larger than 2nd!
{
GamePlay.gpPostMissionLoad("missions/BF/submissions/redships.mis");
// prints message on screen after mission load
GamePlay.gpHUDLogCenter("New allies ships in E6!");

}

// loads the 2nd sub-mission, etc. the same way
if (Time.tickCounter() % 144000 == 72000) // 144000 = 80 min repeat, 75000 = 40 min delay.
{
GamePlay.gpPostMissionLoad("missions/BF/submissions/blueships.mis");
GamePlay.gpHUDLogCenter("New axis ships in I5!");

}

// loads the 3rd sub-mission
if (Time.tickCounter() % 27000 == 26999) // 27000 = 15 min repeat, 26999 = 15 min delay
{
GamePlay.gpPostMissionLoad("missions/BF/submissions/redplanes.mis");
//GamePlay.gpHUDLogCenter("New allies planes in E6!");

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

}

// loads the 4th sub-mission
if (Time.tickCounter() % 27000 == 1800) // 15 min repeat, 1800 = 1 min delay
{
GamePlay.gpPostMissionLoad("missions/BF/submissions/blueplanes.mis");
//GamePlay.gpHUDLogCenter("New axis planes in I5!");

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

}
}





}
Reply With Quote
  #2  
Old 05-02-2012, 05:59 PM
Troll2k Troll2k is offline
Approved Member
 
Join Date: Dec 2007
Posts: 722
Default

Ataros' sticky at the top of this page might have an example for you.
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 02:46 AM.


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