Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2011, 06: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 06:21 AM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:54 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.