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
  #4  
Old 03-09-2012, 05:42 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You can do this via script:

Set your Airgroups on Idle.

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
using maddox.GP;


public class Mission : AMission
{

    public void SetAirgroupActivAfter(Dictionary<string, double> StartAirgroupAfterTime)
        {
            List<AiAirGroup> allAirgroups = new List<AiAirGroup>();

            if (gamePlay.gpAirGroups(1) != null)
                allAirgroups.AddRange(gamePlay.gpAirGroups(1));
            if (gamePlay.gpAirGroups(2) != null)
                allAirgroups.AddRange(gamePlay.gpAirGroups(2));

            allAirgroups.ForEach(item =>
                {
                    
                    foreach (KeyValuePair<string, double> kvp in StartAirgroupAfterTime)
                    {
                        if (item.Name().Contains(kvp.Key))
                        {
                            Timeout(kvp.Value, () =>
                            {
                                item.Idle = false;
                            });
                        }
                    }
                });
        }

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

        SetAirgroupActivAfter(new Dictionary<string, double>
                            {
                                {"BoB_RAF_F_64Sqn_Early", 120.0}, //2min
                                {"BoB_RAF_F_111Sqn_Early", 180.0}, //3min
                                {"BoB_LW_JG51_III", 900.0} //15min
                            });
    }
}
With SetAirgroupActivAfter you can activate the Airgroup.
You can also use (for example)
SetAirgroupActivAfter(new Dictionary<string, double>
{
{"BoB_RAF_F", 900.0} //15min
});

to set all RAF Fighter units active after (in this case) 15min.
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 10:27 AM.


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