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
  #7  
Old 02-27-2012, 12:38 AM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

Ok now I am going to jump to objective missions which is blocked region after the AI despawner.

Here I have modified an Onplace enter piece of code, original from the collection at 1C, but when the player enters a plane an objective is created, I trigger the TrigMis(), again this triggers the list of objectives in the objective mission list and randomly selects an objective. The selection times out after 30 minutes (period for testing) before objective reset and another objective mission could be loaded. Every player who enters an aircraft wll get a message of the current objective, the opposing team gets a warning a player enters and gets the message to defend that objective, or they could go after their objective. Again as other random lists of missions sets you can have nulls, (there is plenty to play with anyway), currently even though I have a number of objective missions in the lists for each side there is only one objective mission, I’ve yet to create some more, maybe some users can create some! The time reset is still under consideration, deciding on reset on completion or time reset, or both. At the moment objectives do reset on completion and time resets, but not in the case of non completion.


Code:
/*=========================================*/

    #region OnPlaceEnter Welcome Tx, objective creation

    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 }, "Bombers, Check your maps for targets!"); }                        
                    }
                    else { GamePlay.gpHUDLogCenter(new Player[] { player }, "Fighters, Escort Bombers or Patrol the lines!"); }                    
                    pUK4 = true;// set main mission objective group activation true/false
                    TrigMis();// apply the truth
                    break;
                case 2:
                    if (aircraft.Type() == AircraftType.Bomber)
                    {
                        { GamePlay.gpHUDLogCenter(new Player[] { player }, "Bombers, uberprüfen Sie Ihre Karten fur Ziele!"); }                        
                    }
                    else { GamePlay.gpHUDLogCenter(new Player[] { player }, "Fighters, Escort Bombers oder Patrol den Zeilen!"); }                    
                    pDE4 = true;
                    TrigMis();
                break;
            }           
    }

    #endregion

    /*=========================================*/

Last edited by Smokeynz; 02-27-2012 at 12:47 AM.
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:06 AM.


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