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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-11-2012, 12:42 PM
king1hw king1hw is offline
Approved Member
 
Join Date: Jul 2010
Posts: 64
Default Radar

No worries working great just had to spread out mission load better 30 minutes in july is to close. I was also trying to remove the Mission loading capabilities so that they just loaded in a series I did this by adding the the OnBattle Start section and then in as a OnTickTime in each individual mission script how ever not getting the Hud to be displayed to each team try rewriting it myself but I am really not a C++ guy. So I just have stuck with what works. Log and no hub display at all, I can separate it to go to each team.

Basic add on to each mission script:
using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;
using System.Diagnostics;

public class Mission : AMission
{

Stopwatch MissionTimer1M2 = new Stopwatch();


public override void OnBattleStarted()
{
base.OnBattleStarted();

//MissionNumberListener = -1;

MissionTimer1M2.Reset();
MissionTimer1M2.Start();
}

//Section 1: Trigger Nachrichten

public override void OnTrigger(int missionNumber, string shortName, bool active)
{
base.OnTrigger(missionNumber, shortName, active);

if ("Trigger2All".Equals(shortName) && active)
{
AiAction action = GamePlay.gpGetAction("Trigger2All");
if (action != null)
{
action.Do();
}
GamePlay.gpGetTrigger(shortName).Enable = false;
}

if (("ScoreBlue50".Equals(shortName) && active) && (MissionTimer1M2.Elapsed.Minutes <= 5) //Trigger 1 Nachricht
{
GamePlay.gpHUDLogCenter("The LW succeeded and inflicted heavy damage on Port of Dover");
GamePlay.gpGetTrigger(shortName).Enable = false;
}

if (("ScoreRed51".Equals(shortName) && active) && (MissionTimer1M2.Elapsed.Minutes <= 5) //Trigger 1 Nachricht
{
GamePlay.gpHUDLogCenter("The RAF inflicted heavy losses on the LW bombers");
GamePlay.gpGetTrigger(shortName).Enable = false;
}

if (("ScoreRed49".Equals(shortName) && active) && (MissionTimer1M2.Elapsed.Minutes <= 5) //Trigger 2 Nachricht
{
GamePlay.gpHUDLogCenter("The RAF inflicted heavy losses on the LW bombers");
GamePlay.gpGetTrigger(shortName).Enable = false;
}
if (("ScoreRed100".Equals(shortName) && active) && (MissionTimer1M2.Elapsed.Minutes <= 5) //Trigger 2 Nachricht
{
GamePlay.gpHUDLogCenter("The German minelayer was successully stopped!");
GamePlay.gpGetTrigger(shortName).Enable = false;
}

if ("Trigger2A".Equals(shortName) && active) //Trigger 2 Nachricht
{
GamePlay.gpHUDLogCenter("German build-up over Calais plotted, heading N!");
GamePlay.gpGetTrigger(shortName).Enable = false;
}

}

public override void OnTickGame()
{
if (Time.tickCounter() % 1296000 == 72000) // 1296000 = 12 hour repeat, 72000 = 40 min delay.
{
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/July1940_v10/Missionen/Mission2.mis");

double initTime = 0.0;
Timeout(initTime += 100, () =>
{
GamePlay.gpHUDLogCenter(null, "RAF fly CAP between Calais and Dover", new object[] {});
GamePlay.gpLogServer(null, "RAF fly CAP between Calais and Dover", new object[] {});
GamePlay.gpHUDLogCenter(null, "LW meet a flight of Do17s 5000m over Calais in appr. {0} min.! Escort them", new object[] {});
GamePlay.gpLogServer(null, "LW meet a flight of Do17s 5000m over Calais in appr. {0} min.! Escort them", new object[] {});
}
}

//Section 4 : AI remove

public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
{
base.OnActorCreated(missionNumber, shortName, actor);
if (actor is AiGroundActor)
Timeout(3599, () =>
{
if (actor != null)
{ (actor as AiGroundActor).Destroy(); }
}
);
}

}



As you can see there is no space between messages and the first gets lost.

thank for working so hard to keep this sim in the air Kodiak.
Reply With Quote
 


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 11:58 PM.


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