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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-01-2012, 09:32 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default Aircraft abort mission (RTB) if damaged?

I'm trying to get an individual aircraft in an airgroup to RTB if a certain amount of damage or a particularly vital ststem is damaged. As a start, I'm just seeing if I can get the group or an airvraft in the group to RTB with the code below. I recall reading somewhere that you can't assign AI's new waypoints on the fly & that they have to go to their next waypoint before any dynamically added waypoints become active. Am I on the right track here? can anyone suggest a methodology?

Code:
    public override void OnAircraftDamaged(int missionNumber, string shortName, AiAircraft aircraft, AiDamageInitiator initiator, part.NamedDamageTypes damageType)
    {
        base.OnAircraftDamaged(missionNumber, shortName, aircraft, initiator, damageType);

        if (aircraft is AiAircraft && aircraft != null)
        {
            aircraft.AirGroup().setTask(AiAirGroupTask.LANDING, null);
         }
    }
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE
Reply With Quote
 


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 01:43 AM.


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