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
‘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
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]
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
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