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
  #5  
Old 01-10-2012, 10:36 PM
Smokeynz Smokeynz is offline
Approved Member
 
Join Date: Apr 2011
Posts: 106
Default

Thanks Kodak,

Ok I did try and replicate the messaging to players in multiplayer for this, but must of had syntax wrong when i tried.

Can I use this as part of messaging aswell, or is it best to list separately for different jobs? (I hate repeating the same code, luv subs to do repeating stuff)

Ok I think I have followed your advise, can you please check the following section. Not sure if I am asking this if question correctly.
if (players.Exists(players => players.Army() == Chkarmy))



Code:
    private void Playerlist()
    {
        List<Player> players = new List<Player>();

        if (GamePlay.gpPlayer() != null)
            players.Add(GamePlay.gpPlayer());

        if (GamePlay.gpRemotePlayers() != null)
            players.AddRange(GamePlay.gpRemotePlayers());
    }

    //example of side specific overflight trigger response, message indicator    
    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName,  active);
        int Chkarmy;
        /*===================de triggered mis=====================*/

        if ("de1".Equals(shortName) && active)
        {
            Playerlist(); //list players ingame
       
            ScreenMsg(-1, shortName + " trigger stage 1");// rem out once checks complete

            Chkarmy = 1;

            if (players.Exists(players => players.Army() == Chkarmy))
            {
                switch (de1S)
                {
                    case 1:
                        ScreenMsg(-1, shortName + " trigger switch stage 2");// rem out once checks complete
                        de1M();//trigger for map load
                        break;
                    case 2:
                        ScreenMsg(-1, shortName + " trigger already in action");// rem out once checks complete
                        break;
                }
            }
        }
    }
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 09:34 AM.


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