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 06-12-2012, 12:54 PM
king1hw king1hw is offline
Approved Member
 
Join Date: Jul 2010
Posts: 64
Default

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

/////////////////////////////////////////////Player Hub and Log Info
if (Time.tickCounter() % 300 == 0) // every 10 sec.
{
List<Player> players = new List<Player>();

if (GamePlay.gpPlayer() != null)
players.Add(GamePlay.gpPlayer());
if (GamePlay.gpRemotePlayers() != null)
players.AddRange(GamePlay.gpRemotePlayers());

Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray();
Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray();

if (Reds.Length > 0)
{
GamePlay.gpHUDLogCenter(Reds, "Cover our shipping south of Dover (AV22).", new object[] { });
GamePlay.gpLogServer(Reds, "Cover our shipping south of Dover (AV22).", new object[] { });
}

if (Blues.Length > 0)
{
GamePlay.gpHUDLogCenter(Blues, "LW Bombers leave Calais to raid shipping at appr. 4000m! Fly a fighter sweep over AV22!", new object[] { });
GamePlay.gpLogServer(Blues, "LW Bombers leave Calais to raid shipping at appr. 4000m! Fly a fighter sweep over AV22!", new object[] { });
}
}

So does this look right and thanks again for the help and yes I am really trying to learn this stuff.
Reply With Quote
  #2  
Old 06-25-2012, 02:49 PM
king1hw king1hw is offline
Approved Member
 
Join Date: Jul 2010
Posts: 64
Default does this look rt

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

List<Player> players = new List<Player>();
if (GamePlay.gpPlayer() != null)
players.Add(GamePlay.gpPlayer());
if (GamePlay.gpRemotePlayers() != null)
players.AddRange(GamePlay.gpRemotePlayers());

Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray();
Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray();

if(Reds.Length > 0)
{
GamePlay.gpHUDLogCenter(Reds, "RAF- Fly CAP between Calais and Dover", new object[]{}, 2);
GamePlay.gpLogServer(Reds, "RAF- Fly CAP between Calais and Dover", new object[] { });

if(Blues.Length > 0)
{
GamePlay.gpHUDLogCenter(null, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[]{}, 2);
GamePlay.gpLogServer(null, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { });
}
}
Reply With Quote
  #3  
Old 06-25-2012, 03:03 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Corrected:

Code:
public override void OnTickGame()
    {
        if (Time.tickCounter()%864000 == 72000) // 864000 = 8 hour repeat, 72000 = 40 min delay.
        {
            GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/July1940_v10/Missionen/Mission2.mis");
           
            List<Player> players = new List<Player>();
            if (GamePlay.gpPlayer() != null)
                players.Add(GamePlay.gpPlayer());
            if (GamePlay.gpRemotePlayers() != null)
                players.AddRange(GamePlay.gpRemotePlayers());

            Player[] Reds = players.FindAll(item => item.Army() == 1).ToArray();
            Player[] Blues = players.FindAll(item => item.Army() == 2).ToArray();

            if (Reds.Length > 0)
            {
                GamePlay.gpHUDLogCenter(Reds, "RAF- Fly CAP between Calais and Dover", new object[] {}, 2);
                GamePlay.gpLogServer(Reds, "RAF- Fly CAP between Calais and Dover", new object[] {});
            }
            if (Blues.Length > 0)
            {
                GamePlay.gpHUDLogCenter(Blues, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { }, 2);
                GamePlay.gpLogServer(Blues, "LW- Meet a flight of HE111's 5000m over Calais.\n In appr. 10 minutes inot mission! Escort them to Dover!", new object[] { });
            }
        }
    }
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:47 PM.


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