Quote:
Originally Posted by dflion
Just to get the function of the script clear in my head. When you start the mission, your wingman and leader go straight onto autopilot, then they wait for three minutes before they take-off, giving you time to warm-up your engine. You then take-off when they take-off. Is my explanation right, on what you are trying to do with the script?
|
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