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 > CoD Multiplayer

CoD Multiplayer Everything about multiplayer in IL-2 CoD

Reply
 
Thread Tools Display Modes
  #41  
Old 05-16-2011, 05:42 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Current version of script from Repka server. Works like magic )
Feel free to use.

Code:
// v.1_17_04. script by oreva, zaltys, small_bee

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

public class Mission : AMission
{
    
// loading sub-missions
public override void OnTickGame()
{
    if (Time.tickCounter() % 216000 == 108000) // 216000=120 min repeat. 108000=60 min delay. 
    {
        GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_small01.mis");
    }

    if (Time.tickCounter() % 216000 == 215999) // 216000=120 min repeat. 215999=120 min delay. 
    {
        GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_small02.mis");
    }

    ///////////////////////

    if (Time.tickCounter() % 162000 == 9000) // 162000=90 min repeat. 9000=5 min delay. 
  {
      GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_air01.mis");
      // GamePlay.gpHUDLogCenter("mis1 loaded!");

      double initTime = 0.0;
      Timeout(initTime += 600, () =>
      {
          GamePlay.gpHUDLogCenter("Attention! Enemy activity is expected at E3!");
      });
      Timeout(initTime += 600, () =>
      {
          GamePlay.gpHUDLogCenter("Attention! Help is needed at E3/D4!");
      });

   }

     if (Time.tickCounter() % 162000 == 63000) //  ; 162000=90 min repeat, 63000 - 35 min delay. 
    {
      GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_sea01.mis");
      // GamePlay.gpHUDLogCenter("mis2 loaded"); 

      double initTime = 0.0;
      Timeout(initTime += 500, () =>
       {
           GamePlay.gpHUDLogCenter("Attention! Cover your shipping at C4!");
       });
            
      Timeout(initTime += 300, () =>
         {
             GamePlay.gpHUDLogCenter("Attention! Friendly ships are under attack at C4!");
         });
    }

     if (Time.tickCounter() % 162000 == 117000) // 162000 == 117000 = 90 min repeat, 65 min delay 
       {
           GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_air02.mis");
           // GamePlay.gpHUDLogCenter("mis3 loaded!");

           double initTime = 0.0;
           Timeout(initTime += 600, () =>
           {
               GamePlay.gpHUDLogCenter("Attention! Enemy activity is expected at E3!");
           });
           Timeout(initTime += 300, () =>
           {
               GamePlay.gpHUDLogCenter("Attention! All airgroups please proceed to D2!");
           });
       }
}
////////////////////////////////////////////////////////////////////////////////////////////////////

// destroys aircraft abandoned by a player.
    private bool isAiControlledPlane (AiAircraft aircraft) 
    {
		if (aircraft == null) 
        { 
			return false;
		}

		Player [] players = GamePlay.gpRemotePlayers ();
		foreach (Player p in players) 
        {    
			if (p != null && (p.Place () is AiAircraft) && (p.Place () as AiAircraft) == aircraft)
            { 
				return false;
			}
		}

		return true;
	}

	private void destroyPlane (AiAircraft aircraft) {
		if (aircraft != null) { 
			aircraft.Destroy ();
		}
	}

	private void explodeFuelTank (AiAircraft aircraft) 
    {
		if (aircraft != null) 
        { 
			aircraft.hitNamed (part.NamedDamageTypes.FuelTank0Exploded);
		}
	}

	private void destroyAiControlledPlane (AiAircraft aircraft) {
		if (isAiControlledPlane (aircraft)) {
			destroyPlane (aircraft);
		}
	}

	private void damageAiControlledPlane (AiActor actor) {
		if (actor == null || !(actor is AiAircraft)) { 
			return;
		}

		AiAircraft aircraft = (actor as AiAircraft);

		if (!isAiControlledPlane (aircraft)) {
			return;
		}

		if (aircraft == null) { 
			return;
		}

		aircraft.hitNamed (part.NamedDamageTypes.ControlsElevatorDisabled);
		aircraft.hitNamed (part.NamedDamageTypes.ControlsAileronsDisabled);
		aircraft.hitNamed (part.NamedDamageTypes.ControlsRudderDisabled);
		aircraft.hitNamed (part.NamedDamageTypes.FuelPumpFailure);

        int iNumOfEngines = (aircraft.Group() as AiAirGroup).aircraftEnginesNum();
        for (int i = 0; i < iNumOfEngines; i++)
        {
            aircraft.hitNamed((part.NamedDamageTypes)Enum.Parse(typeof(part.NamedDamageTypes), "Eng" + i.ToString() + "TotalFailure"));
        }

        /***Timeout (240, () =>
                {explodeFuelTank (aircraft);}
            );
         * ***/

        Timeout (300, () =>
				{destroyPlane (aircraft);}
			);
	}

    //////////////////////////////////////////

	public override void OnPlaceLeave (Player player, AiActor actor, int placeIndex) 
    {
		base.OnPlaceLeave (player, actor, placeIndex);
		Timeout (1, () =>
				{damageAiControlledPlane (actor);}
			);
	}

	public override void OnAircraftCrashLanded (int missionNumber, string shortName, AiAircraft aircraft) 
    {
		base.OnAircraftCrashLanded (missionNumber, shortName, aircraft);
		Timeout (300, () =>
            { destroyPlane(aircraft); }
			);
	}
    public override void OnAircraftLanded (int missionNumber, string shortName, AiAircraft aircraft) 
    {
        base.OnAircraftLanded(missionNumber, shortName, aircraft);
        Timeout(300, () =>
            { destroyPlane(aircraft); }
            );
    }
    
    
//////////////////////////////////////////////////////////////////////////////////////////////////

    //Listen to events of every mission
    public override void Init(maddox.game.ABattle battle, int missionNumber)
    {
        base.Init(battle, missionNumber);
        MissionNumberListener = -1; //Listen to events of every mission
    }

 //////////////////////////////////////////////////////////////////////////////////////////////////

    //Ground objects (except AA Guns) will die after 55 min when counted from their birth

    public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
    {
        base.OnActorCreated(missionNumber, shortName, actor);
        //Ground objects (except AA Guns) will die after 55 min when counted from their birth
        if (actor is AiGroundActor)
            if ((actor as AiGroundActor).Type() != maddox.game.world.AiGroundActorType.AAGun)
                Timeout(3300, () =>
                {
                    if (actor != null)
                    { (actor as AiGroundActor).Destroy(); }
                }
                        );
    }

    /****
    //Ground objects will die after 55 min when counted from their birth
    
    public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
    {
        base.OnActorCreated(missionNumber, shortName, actor);

        //Ground objects will die after 55 min when counted from their birth
        if (actor is AiGroundActor)
            Timeout(3300, () =>
            {
                if (actor != null)
                { (actor as AiGroundActor).Destroy(); }
            }
                    );
    }
    ****/
}
Reply With Quote
  #42  
Old 05-17-2011, 12:40 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by Groundhog View Post
Glad to help!

GH
I can not get the randomization part to work as I wrote here
http://forum.1cpublishing.eu/showpos...&postcount=109
and here
http://forum.1cpublishing.eu/showpos...&postcount=111

Could you have a look please.

UPD. fixed.

Why do you need the first part in your script with a trigger?
Did you check if it works without the first part? May it be the case that the 1st part is working but the 2nd does not as I included only the 2nd part in my script?

Last edited by Ataros; 05-20-2011 at 12:29 PM.
Reply With Quote
  #43  
Old 06-15-2011, 09:08 AM
335th_GRAthos 335th_GRAthos is offline
Approved Member
 
Join Date: Oct 2007
Posts: 1,240
Default

Hallo Ataros,

I do not know if it is too much asking, can you post the missions you have running on the REPKA Server #(I do not know the number) the one with English Channel and the many objects moving around.

I could not find the server yesterday and I would ike to play around with my GPU settings (I only get 30fps with this gameset while the other REPKA English chanel map gives me 85fps and the islands map 110 with grass, shadows, roads off)...

~S~
Reply With Quote
  #44  
Old 06-15-2011, 09:15 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Hi GRAthos!

Please find Repka #1 mission attached. Repka #2 runs a mission by cFobos and I do not have it on my PC.
Attached Files
File Type: zip BoF1_1_7_04g.zip (31.2 KB, 60 views)
Reply With Quote
  #45  
Old 06-15-2011, 10:30 AM
335th_GRAthos 335th_GRAthos is offline
Approved Member
 
Join Date: Oct 2007
Posts: 1,240
Default

Many Thanks !




~S~
Reply With Quote
  #46  
Old 08-12-2011, 01:08 PM
jojovtx jojovtx is offline
Approved Member
 
Join Date: Sep 2010
Posts: 134
Default

On Repka 2 is there any chance you can add the 110C4? I understand not having the C7 because it almost give an unfair balance in ground attack to blue. I cannot in good conscious fly on a server that does not have the 110C4 available though.

Thanks.
Reply With Quote
  #47  
Old 08-12-2011, 04:57 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

rgr, asked BigRepa
Reply With Quote
  #48  
Old 09-07-2011, 08:37 PM
Dangerousdave26 Dangerousdave26 is offline
Approved Member
 
Join Date: Aug 2011
Location: South Florida so close I can see the Tropics
Posts: 16
Default

Quote:
Originally Posted by Ataros View Post
New version of "Battle of France"

Added guns to tankers.
Spawns assigned to runways on some airfields.
etc.

Ataros we are running this mission on our server (128BoFv1_6.mis). What is the suggested time frame to rotate maps?

Thanks
Reply With Quote
  #49  
Old 09-07-2011, 11:25 PM
Richie's Avatar
Richie Richie is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,450
Default

Where are the mission files stored once you build them. How do you get rid of them and how do you make them work? How come I can't select a plane in a coop mission like I could in IL-2? My dogfight mission bases don't show up at all. I sure liked Simple Simon IL-2. This thing is great but mission building...playing has me stumped

Last edited by Richie; 09-07-2011 at 11:27 PM.
Reply With Quote
  #50  
Old 09-08-2011, 02:04 AM
Richie's Avatar
Richie Richie is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,450
Default

I just did get a coop to work and for some reason the missions are in the folder now. They weren't in there before the patch...weird. Now I'll see if I can make a Dogfight mission work. It's got to be something stupid that I'm not doing...me being the stupid part of it.

I've got to say sitting back and letting that mission play and listening to those 109s and Spitfires roar up and down this river on the new mid size map witch I like was a blast. The sound is fantastic
Attached Images
File Type: jpg 2011-09-07_00039.jpg (186.5 KB, 11 views)
File Type: jpg 2011-09-07_00034.jpg (177.4 KB, 8 views)
File Type: jpg 2011-09-07_00026.jpg (191.0 KB, 11 views)
Reply With Quote
Reply


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:16 PM.


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