![]() |
|
#1
|
|||
|
|||
![]()
Hey guys,
I can't seem to figure out how to get planes to take off at a certain time. I have a huge wave of Luftwaffe planes flying from inland France, and I don't want the RAF to respond until the Germans are just off the coast. But it seems that FMB won't let me designate a time for the planes to take off -- it just forces them to take off at the start of the mission! ![]() Any idea how I can accomplish this? |
#2
|
|||
|
|||
![]()
http://forum.1cpublishing.eu/showthread.php?t=28487
this uses a pass thru trigger rather than 'setting a time'. |
#3
|
|||
|
|||
![]()
Hmm, this is new to me (never been into FMB too much) and looks quite useful.
However, it's a shame you can't just set the time... ![]() |
#4
|
|||
|
|||
![]()
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 }); } } 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. |
#5
|
|||
|
|||
![]()
I have years of professional experience with C#, but I'm a n00b for FMB. I'm not quite sure how to even load/execute a C# module with the IL-2 engine/FMB!
![]() Anyway... You got me wondering... If I set up some front markers for red and blue, is there a C# event/delegate I can subscribe to when aircraft cross the front? Something like: void onFrontCrossed(params Plane[] planes) { // ...blah blah blah ...} ??? Where can I find documentation on this stuff? Is there any? ![]() P.S. -- I also have VS Pro, and would much prefer using my own IDE. Is there any way to do it properly? Last edited by keinmann; 03-11-2012 at 02:42 AM. |
#6
|
|||
|
|||
![]()
First there is no documentation. If there is a cs file with the same name than the mission the Engine calls the .net csc and execute the file.
To get access to the "CloDo programming interface" add references to the assemblies "antlr.runtime.dll", "core.dll", "gamePages.dll", "gamePlay.dll", "gameWorld.dll", "HostView.dll", "maddox.dll", "part.dll", "sound.dll" and "Strategy.dll" in ..\Steam\SteamApps\common\il-2 sturmovik cliffs of dover\parts\core and to the files "partBob.dll" and "Campaign.dll" in ..\Steam\SteamApps\common\il-2 sturmovik cliffs of dover\parts\bob Then you can examine the classes with the object explorer. The importent classes for missions are AMission and IGamePlay (GamePlay Object). There is many try and error expirience, some of the members not working proberly (or not fully implementet at time) or they work in single player and player hosted missions but not on Dedi Server. ![]() There is no event for crossing Front but you can use GamePlay.gpFrontExist() // true if there is a front line GamePlay.gpFrontDistance(int army, double x, double y) // double distance to front line < 0 if army == player.Army() > 0 if oposite And with the OnTickGame() - Event (one Tick is 1/30sek) you can check by your own if a plane cross the line Last edited by FG28_Kodiak; 03-11-2012 at 04:10 AM. |
![]() |
|
|