PDA

View Full Version : Eagle Campaign


Bullit
09-22-2011, 03:59 PM
Iam really enjoying the English version of the Eagle Day Campaign that us available for download. The only real issue or feed back is that one has very little time on the runway to start ones engine CEM enabled and then warm the engine before takeoff. The AI pilots seem to start engines and are off within seconds, is there anyway of extending this period without ruining the mission?

dflion
09-26-2011, 06:51 AM
Thanks for mentioning this very important anomaly in COD FMB Campaign building - 'Built'.

All the campaigns /missions I have created in COD so far have this problem.
Some how the mission time has to be put 'on hold' (by programming -Ilya) while you go through your cockpit start-up routine and engine warm-up. The time comes back 'on-line' when you actually take-off, therefore not effecting the 'trigger' actions during the mission.

I really personally like the procedure of starting-up your aircraft, sequencially using the cockpit startup routine, it totally adds to the immersion of the mission.

DFLion

adonys
09-26-2011, 08:59 AM
Until then, you can simply let AI take control over your airplane for take-off..

Which brings us to the next issue: switching from AI to player and back should keep all CEM settings made by AI to the player too (as to not find yourself with max RPM while on diving, oil and water radiators closed, etc)

FG28_Kodiak
09-26-2011, 10:23 AM
You can add this code to a script:


using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;


public class Mission : AMission
{

private void setMainMenu(Player player)
{
GamePlay.gpSetOrderMissionMenu(player, false, 0, new string[] { "Start Airgroup Engines" }, new bool[] { true });
}

public override void OnOrderMissionMenuSelected(Player player, int ID, int menuItemIndex)
{
base.OnOrderMissionMenuSelected(player, ID, menuItemIndex);

if (ID == 0) // main menu
{
if (menuItemIndex == 1) // Start Airgroup Engines
{
GamePlay.gpLogServer(null, "Start Engines", null); // Controlmessage
GamePlay.gpPlayer().Place().Group().Idle = false;
}
}
}


public override void Inited()
{
setMainMenu(GamePlay.gpPlayer());
}


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

MissionNumberListener = -1;

GamePlay.gpPlayer().Place().Group().Idle = true;
}
}


With this you can give a "Start Airgroup Engines" - Command via the communication menu. 4.Mission -> 1. Start Airgroup Engines.

Little Explanation with
GamePlay.gpPlayer().Place().Group().Idle you can set the player Airgroup to Idle (true) or active (false).
So at the beginning i set the player airgroup to idle (true).
And add a entry to the mission menu, so the player can activate the airgroup manually.

This Script works in singleplayer and with actual beta (needs GamePlay.gpSetOrderMissionMenu and OnOrderMissionMenuSelected(..) ).

bolox
09-26-2011, 10:35 AM
cheers for this - looks useful- and the explanation even more so;)

Punch_145
12-07-2012, 07:23 PM
Hi Kodiak,
Do I need more code to get the communication menu. 4.Mission option to work?
I see it but it's greyed out .



On further exploration it works when used as a single script it's when I add it to a script already created it doesn't so I guess it's a problem with how I'm attaching it

Punch_145
12-09-2012, 11:03 AM
This is what I have

using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;

public class Mission : AMission
{

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

GamePlay.gpHUDLogCenter("Welcome to TP Night");



}



public override void OnTrigger(int missionNumber, string shortName, bool active)
{
if ("WinCondition1".Equals(shortName) && active)
{
GamePlay.gpHUDLogCenter("Mission Success !");
GamePlay.gpGetTrigger(shortName).Enable = false;


}
}





private void setMainMenu(Player player)
{
GamePlay.gpSetOrderMissionMenu(player, false, 0, new string[] { "Start Airgroup Engines" }, new bool[] { true });
}

public override void OnOrderMissionMenuSelected(Player player, int ID, int menuItemIndex)
{
base.OnOrderMissionMenuSelected(player, ID, menuItemIndex);

if (ID == 0) // main menu
{
if (menuItemIndex == 1) // Start Airgroup Engines
{
GamePlay.gpLogServer(null, "Start Engines", null); // Controlmessage
GamePlay.gpPlayer().Place().Group().Idle = false;
}
}
}


public override void Inited()
{
setMainMenu(GamePlay.gpPlayer());
}


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

MissionNumberListener = -1;

GamePlay.gpPlayer().Place().Group().Idle = true;
}
}

Punch_145
12-09-2012, 01:46 PM
Sorted.................realized the "public override void OnBattleStarted()" section of your script needs to go in the section already created in my script .............