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
  #15  
Old 04-28-2011, 05:00 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

New bits of code from devs.

Shows mission objectives to players depending on side and aircraft type (fighter/bomber).

"hitler caput" lol

Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceEnter(player, actor, placeIndex);
        AiAircraft aircraft = actor as AiAircraft; 
        
        if (aircraft != null)
        switch (aircraft.Army())
        {                
            case 1:
                if (aircraft.Type() == AircraftType.Bomber)
                { GamePlay.gpHUDLogCenter(new Player[] {player},"Red Bomber, Bomb it all, hitler caput"); }
                else { GamePlay.gpHUDLogCenter(new Player[] { player }, "Red Fighter, fight them all"); }
                break;
            case 2:
                if (aircraft.Type() == AircraftType.Bomber)
                { GamePlay.gpHUDLogCenter(new Player[] { player }, "Das bomber!"); }
                else { GamePlay.gpHUDLogCenter(new Player[] { player }, "Das jager!"); }
                break;

        }
    }

    public override void OnAircraftTookOff(int missionNumber, string shortName, AiAircraft aircraft)
    {
        base.OnAircraftTookOff(missionNumber, shortName, aircraft);

        if (GamePlay.gpPlayer().Place() != aircraft)
            return;
        
        switch (aircraft.Army())
        {
            case 1:
                if (aircraft.Type() == AircraftType.Bomber)
                { GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Red Bomber, Bomb it all, hitler caput"); }
                else { GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Red Fighter, fight them all"); }
              break;
            case 2:
                if (aircraft.Type() == AircraftType.Bomber)
                { GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Das bomber!"); }
                else { GamePlay.gpHUDLogCenter(new Player[] { GamePlay.gpPlayer() }, "Das jager!"); }
              break;

        }
    }

Last edited by Ataros; 04-28-2011 at 05:03 PM.
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 11:35 PM.


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