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
  #21  
Old 04-26-2011, 01:38 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by mcler002 View Post
Ive got the script to work... but no aircraft appear... (i have 6 spitfires loaded on the map)...

And can someone explain the tick counter and how to "work it"

Cheers
Check that path is correct and open doghous3 or my example to add a line printing smth on screen to confirm that mission is loaded.

30 tics a second give you 1800 tics per minute.

if (Time.tickCounter() % 1200 == 0)

1200 - is cycle here
0 - is initial delay before running script.

I'd suggest taking doghous3 script to start with and just change filenames in it to avoid simple mistakes. This is what I did with his mission.
Reply With Quote
  #22  
Old 04-26-2011, 01:44 PM
mcler002 mcler002 is offline
Approved Member
 
Join Date: Mar 2011
Location: UK
Posts: 277
Smile

Quote:
Originally Posted by Ataros View Post
Check that path is correct and open doghous3 or my example to add a line printing smth on screen to confirm that mission is loaded.

30 tics a second give you 1800 tics per minute.

if (Time.tickCounter() % 1200 == 0)

1200 - is cycle here
0 - is initial delay before running script.

I'd suggest taking doghous3 script to start with and just change filenames in it to avoid simple mistakes. This is what I did with his mission.
Hope your on still

I double checked mine and doghouse's map.... neither planes load... the message pops up but thats it... i load on the game console and it mentions "load failed"... Any reason behind this :S? Steam and VAC? :S
See attached picture

Cycle here - ? whats that lol update Is this the part where it "reloads" itself? or "deletes" itself??

Cheers

DOH - HANG ON A SEC

LOL never laughed at myself so much... copy and paste - bad idea... forgot my sub folder in the line... all my own missions are saved in "Ross" folder... talk about wasting a few hours - ALL FIXED NOW

Still need an answer on the cycle though!
Attached Images
File Type: bmp Console.bmp (2.08 MB, 26 views)

Last edited by mcler002; 04-26-2011 at 01:59 PM.
Reply With Quote
  #23  
Old 04-26-2011, 01:54 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by mcler002 View Post
Hope your on still

I double checked mine and doghouse's map.... neither planes load... the message pops up but thats it... i load on the game script and it mentions "loaded failed"... Any reason behind this :S? Steam and VAC? :S :
Check if you put it in the correct directory. Doghous3 mission runs on the SYN server just fine atm.

Quote:
Originally Posted by mcler002 View Post
Cycle here - ? whats that lol update Is this the part where it "reloads" itself? or "deletes" itself??

Cheers
By cycle I mean it reloads a 2nd mission (sub-mission) every 1200 ticks in this example that is every 40 seconds.
Reply With Quote
  #24  
Old 04-26-2011, 02:01 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

New version of "Battle of France"

Added guns to tankers.
Spawns assigned to runways on some airfields.
etc.
Attached Files
File Type: zip 128BoF 1_6_01.zip (7.3 KB, 71 views)
Reply With Quote
  #25  
Old 04-26-2011, 02:11 PM
mcler002 mcler002 is offline
Approved Member
 
Join Date: Mar 2011
Location: UK
Posts: 277
Talking Thanks

Cheers for all your help, hopefully have a map to show soon!
Reply With Quote
  #26  
Old 04-26-2011, 02:28 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by mcler002 View Post
Cheers for all your help, hopefully have a map to show soon!
Good luck!

Last edited by Ataros; 04-27-2011 at 06:42 AM.
Reply With Quote
  #27  
Old 04-26-2011, 02:30 PM
mcler002 mcler002 is offline
Approved Member
 
Join Date: Mar 2011
Location: UK
Posts: 277
Post Delete AI after mission?

Ack next question

Any script or trigger to remove AI after mission? or should i just get them to RTB then "vanish"...

Cheers
Reply With Quote
  #28  
Old 04-26-2011, 03:39 PM
mcler002 mcler002 is offline
Approved Member
 
Join Date: Mar 2011
Location: UK
Posts: 277
Cool This is what I've made

Ok people

This is what i have made so far...

3 sub missions (b1 4xhe115 attack convoy, b2 8x he111 attack base, r1 12xblenheim attack base)

So many things can be changed/ done differently after learning a few things about script...

However, please feel free to have a look and make comments (bad or good!)

All i really want to know now is:

a) can you end the sub missions before the script starts the new one
b) bring back destory "static" objects after "x" amount of time?

Cheers

Ross

Note - If you are going to use my game maps, make sure you change the script directory for each sub mission!!! in "OnlineBoB" - Hope you understand!!!
Attached Files
File Type: zip OnlineBOB.zip (8.1 KB, 44 views)

Last edited by mcler002; 04-26-2011 at 03:41 PM.
Reply With Quote
  #29  
Old 04-26-2011, 04:12 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by mcler002 View Post
Ack next question

Any script or trigger to remove AI after mission? or should i just get them to RTB then "vanish"...

Cheers
Discussed here http://forum.1cpublishing.eu/showthr...t=21518&page=2
I think a good idea would be to disable AI controls or kill engine with a script in 30 minutes after the last waypoint and destroy it 10 minutes later.

We need such a script badly. Hope someone with C# knowledge can write it for us.

Last edited by Ataros; 04-27-2011 at 06:46 AM.
Reply With Quote
  #30  
Old 04-28-2011, 03:52 PM
mcler002 mcler002 is offline
Approved Member
 
Join Date: Mar 2011
Location: UK
Posts: 277
Smile My mission update

Update for my online map

not sure if the script for disabling ai controls works though :S

Ross

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

public class Mission : AMission
{


    public override void OnTickGame()
    {

            if (Time.tickCounter() %  54000 == 18000)
            {
                
                GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Ross/OnlineBOBb1.mis");
				GamePlay.gpHUDLogCenter("Intel: 4x He115's, Heading for Convoy!");
			}
		        
            if (Time.tickCounter() %  99000 == 36000)
            {
                
                GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Ross/OnlineBOBb2.mis");
				GamePlay.gpHUDLogCenter("Intel: 8x He111's, Heading for Lympne!"); 
			}

            if (Time.tickCounter() %  108000 == 27000)
            {
                
                GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/Ross/OnlineBOBr1.mis");
				GamePlay.gpHUDLogCenter("Intel: 12xBlenheim, Heading for Calais Marck!"); 
			}
	}


// destroys aircraft abandoned by a player
    public void _DespawnEmptyPlane(AiActor actor)
    {
        if (actor == null)
        { return; }

        Player[] Players = GamePlay.gpRemotePlayers();

        bool PlaneIsEmpty = true;

        foreach (Player i in Players)
        {
            if ((i.Place() as AiAircraft) == (actor as AiAircraft))
            {
                PlaneIsEmpty = false;
                break;
            }
        }

        if ((PlaneIsEmpty) && (actor as AiAircraft).IsAirborne())
        {

            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsElevatorDisabled);
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsAileronsDisabled);
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.ControlsRudderDisabled);
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng0TotalFailure);
            //for 2mots
            (actor as AiAircraft).hitNamed(part.NamedDamageTypes.Eng1TotalFailure);

            //then wait 1sec?
            Timeout(1.0, () =>
            {
                (actor as AiAircraft).Destroy();
            });

        }
        else if (PlaneIsEmpty)
        {
            (actor as AiAircraft).Destroy();
        }
    }

    public override void OnPlaceLeave(Player player, AiActor actor, int placeIndex)
    {
        base.OnPlaceLeave(player, actor, placeIndex);
        _DespawnEmptyPlane(actor);
    }
    // destroys crushlanded aircraft in 10 minutes
    public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft)
    {
        base.OnAircraftCrashLanded(missionNumber, shortName, aircraft);
        Timeout(600, () =>
        {
            aircraft.Destroy();
        });
    }
}
Please make sure you change the file directory to your "set-up"
Attached Files
File Type: zip OnlineBOB UPD 280411.zip (8.5 KB, 26 views)

Last edited by mcler002; 04-28-2011 at 03:56 PM.
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:30 PM.


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