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
  #2  
Old 08-05-2017, 12:46 PM
king1hw king1hw is offline
Approved Member
 
Join Date: Jul 2010
Posts: 64
Default Or This

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;

public class Mission : AMission
{
    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        if (shortName.Equals("Shoreham"))
        {
            GamePlay.gpPostMissionLoad("missions\Multi\Co-Op\The_Battle_of_Britain\Intercept_Missions\Redhill.mis");
            GamePlay.gpGetTrigger(shortName).Enable = true;
            // prints message on screen after mission load
			GamePlay.gpHUDLogCenter(RedSide(), ("Enemy Approaching Shoreham!");
        }

    }
	    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        if (shortName.Equals("IsleWight"))
        {
            GamePlay.gpPostMissionLoad("missions\Multi\Co-Op\The_Battle_of_Britain\Intercept_Missions\Ford.mis");
            GamePlay.gpGetTrigger(shortName).Enable = true;
			// prints message on screen after mission load
			GamePlay.gpHUDLogCenter(RedSide(), ("Enemy Approaching West Isle of Wight!");
        }

    }
	    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        if (shortName.Equals("Willmington"))
        {
            GamePlay.gpPostMissionLoad("missions\Multi\Co-Op\The_Battle_of_Britain\Intercept_Missions\Willmington.mis");
            GamePlay.gpGetTrigger(shortName).Enable = true;
			// prints message on screen after mission load
			GamePlay.gpHUDLogCenter(RedSide(), ("Enemy Approaching Eastbourne!");
        }

    }
	    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        if (shortName.Equals("Dover"))
        {
            GamePlay.gpPostMissionLoad("missions\Multi\Co-Op\The_Battle_of_Britain\Intercept_Missions\Hawk.mis")m;
            GamePlay.gpGetTrigger(shortName).Enable = true;
			// prints message on screen after mission load
			GamePlay.gpHUDLogCenter(RedSide(), ("Enemy Approaching Dover!");
        }

    }
	    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        if (shortName.Equals("Southend"))
        {
            GamePlay.gpPostMissionLoad("missions\Multi\Co-Op\The_Battle_of_Britain\Intercept_Missions\Eastchurch.mis");
            GamePlay.gpGetTrigger(shortName).Enable = true;
			// prints message on screen after mission load
			GamePlay.gpHUDLogCenter(RedSide(), ("Enemy Approaching Northern Channel!");
        }

	}
		    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);
        if (shortName.Equals("IsleWight2"))
        {
            GamePlay.gpPostMissionLoad("missions\Multi\Co-Op\The_Battle_of_Britain\Intercept_Missions\Ford.mis");
            GamePlay.gpGetTrigger(shortName).Enable = true;
			// prints message on screen after mission load
			GamePlay.gpHUDLogCenter(RedSide(), "Enemy Approaching East Isle of Wight!");
        }

	}

    public List<Player> GetAllPlayer()
    {
        List<Player> players = new List<Player>();

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

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

        return players;
    }

    public Player[] BlueSide()
    {
        if (GetAllPlayer().Exists(item => item.Army() == 2))
            return GetAllPlayer().FindAll(item => item.Army() == 2).ToArray();

        return null;
    }

    public Player[] RedSide()
    {
        if (GetAllPlayer().Exists(item => item.Army() == 1))
            return GetAllPlayer().FindAll(item => item.Army() == 1).ToArray();

        return null;
    }

    public override void OnTrigger(int missionNumber, string shortName, bool active)
    {
        base.OnTrigger(missionNumber, shortName, active);

        if (shortName.Equals("Dover"))
        {
            AiAction action = GamePlay.gpGetAction(ActorName.Full(missionNumber, shortName));

            if (action != null)
            {
                action.Do();
            }

            //Add this for deaktivate the tpassthru trigger
            GamePlay.gpGetTrigger(shortName).Enable = false;


        }
    }
}
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:24 AM.


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