CoD FMB notes: starting out

Finding users’ explanations where possible as some sort of how-to guide with no guide available

From FG28_Kodiak at the 1C forums. Good thread to monitor but it’s slow going
[ul]
[li]How to find the Player’s plane
[/li][li]How to check if the plane is airborne
[/li][li]How to display a message
[/li][/ul]

First i look in which Aircraft the player is.
AiAircraft airc1 = (AiAircraft)GamePlay.gpPlayer().Place();

Then i start the Stopwatch, you can use a trigger or Time.tickCounter() also, its only a example.
PlayerGroupIdleTimer.Start();

Then check if plane is airborne (if it airborne its a bad idea to set it on idle )
if (!airc1.IsAirborne())
{
If the plane is not airborne, i set the complete player airgroup on idle, it’s the same you set the idle state in FMB
airc1.AirGroup().Idle = true;
then a short message for the player
GamePlay.gpHUDLogCenter(player.Name() + " warm up your engine");
}

later in OnTickGame i set the AirGroup().Idle = false; so the AI will make it’s job

http://forum.1cpublishing.eu/showthread.php?t=25435

‘Scripts’ are blocks of runtime code (as it were) that run in a loop while the program/mission is running - like software interrupts and polling. It’s a blast from the past for some of us but- we can handle it. Probably :slight_smile:

Ming

Nice find Ming, though to be pedantic, Kodiac should have used comment delimiters

// First i look in which Aircraft the player is.
PlayerGroupIdleTimer.Start();

// Then check if plane is airborne (if it airborne its a bad idea to set it on idle )
if (!airc1.IsAirborne())
{
[INDENT]//If the plane is not airborne, i set the complete player airgroup on idle, it’s the same you set the idle state in FMB
airc1.AirGroup().Idle = true;
// then a short message for the player
GamePlay.gpHUDLogCenter(player.Name() + " warm up your engine");
}

//later in OnTickGame i set the AirGroup().Idle = false; so the AI will make it’s job[/INDENT]

It’s a notes thread Rob, not code although that’s acceptable too thanks :slight_smile:

The important little stuff in pseudocode. Where’s the plane, what’s it doing, check for damage. Hello World type of thing :slight_smile:

I copied his text in here without meaning it as an example for someone to copy and paste, sorry if I gave that impression mate

First go ought to get a fire engine/tender on to the field when a plane crash-lands, there’s stubs of this around I’ll find out later and report :slight_smile:

Ming

Some scripts in the zip and Dunkirk sounds like fun

http://forum.1cpublishing.eu/showthread.php?t=25640

The campaign tool referred to in the campaign post, I found (a version of) it at-

http://www.sukhoi.ru/forum/showthread.php?t=71437

il2campaigntool0.zip‎ hmm a zero-version at the end but it’ll probably work dated June

(quick scan of juicy script)

Aaagh Russian comments. But- we shall prevail. And in the meantime we can fly it :slight_smile:

Ming

Manually installing campaigns

http://forum.1cpublishing.eu/showthread.php?t=25652

Ming

Backup copy-


You can add a campaign manually.

Look for the folder:
…\Steam\SteamApps\common\il-2 sturmovik cliffs of dover\parts\bob\mission\campaign
there you will find a file named campaigns.ini
open it in a editor, normaly you will find something like that:
[Main]
campaign_gb
campaign_de

[campaign_gb]
folder campaign_gb
title Cliffs Of Dover
image Poster.bmp

[campaign_de]
folder campaign_de
title Adler Angriff
image Poster.bmp

For example i use this campaign http://forum.1cpublishing.eu/showthread.php?t=25640
unpack the Zip, then you will find a directory named campaign_bd, copy this to …\Steam\SteamApps\common\il-2 sturmovik cliffs of dover\parts\bob\mission\campaign
then add the red lines to the campaigns.ini
[Main]
campaign_gb
campaign_de
campaign_bd

[campaign_gb]
folder campaign_gb
title Cliffs Of Dover
image Poster.bmp

[campaign_de]
folder campaign_de
title Adler Angriff
image Poster.bmp

[campaign_bd]
folder campaign_bd
title Messerschmidts over Dunkirk
image Poster.bmp

Save the file and start Cliffs of Dover, now you should be able to select and play the Campaign.
Attention after a Update or Game Intentigrity Check the file will be overritten, so you should make a backup.

I can’t code. I got kicked out of an edication because I failed the couse.
The universe way of telling me to do something else :wink:

But from time to time I am forced to play around with code anyway.
All of which are made by others! I can play around with the stuff if the programmers have been making pseudocode and comments, but the pure stuff is gibberish :frowning:

Thanks Painter for spelling it out :wink: