View Single Post
  #6  
Old 12-16-2011, 05:17 AM
Octocat Octocat is offline
Approved Member
 
Join Date: Dec 2011
Posts: 22
Default

Cool. Simple modification, to add a random delay before failure:

Code:
    public override void OnAircraftTookOff(int missionNumber, string shortName, AiAircraft aircraft)
    {
        if (m_random.Next(1, 200 + 1) != 67)   // 0.5% chance of takeoff failure
        {            
           Timeout(m_random.Next(1, 60), ()=>  DoDamage(aircraft));
        }
    }
Also, in dynamic campaign, the chance of failure may depend on the aircraft aging, and damages in previous missions.

Last edited by Octocat; 12-16-2011 at 05:21 AM.
Reply With Quote