Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   CoD Multiplayer (http://forum.fulqrumpublishing.com/forumdisplay.php?f=192)
-   -   Online / multiplayer missions go here (http://forum.fulqrumpublishing.com/showthread.php?t=21602)

Ataros 04-26-2011 01:38 PM

Quote:

Originally Posted by mcler002 (Post 273608)
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.

mcler002 04-26-2011 01:44 PM

1 Attachment(s)
Quote:

Originally Posted by Ataros (Post 273741)
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 :D - ALL FIXED NOW :D :D :D

Still need an answer on the cycle though!

Ataros 04-26-2011 01:54 PM

Quote:

Originally Posted by mcler002 (Post 273744)
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 (Post 273744)
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.

Ataros 04-26-2011 02:01 PM

1 Attachment(s)
New version of "Battle of France"

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

mcler002 04-26-2011 02:11 PM

Thanks
 
Cheers for all your help, hopefully have a map to show soon!

Ataros 04-26-2011 02:28 PM

Quote:

Originally Posted by mcler002 (Post 273765)
Cheers for all your help, hopefully have a map to show soon!

Good luck!

mcler002 04-26-2011 02:30 PM

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

mcler002 04-26-2011 03:39 PM

This is what I've made
 
1 Attachment(s)
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!!!

Ataros 04-26-2011 04:12 PM

Quote:

Originally Posted by mcler002 (Post 273777)
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.

mcler002 04-28-2011 03:52 PM

My mission update
 
1 Attachment(s)
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"


All times are GMT. The time now is 03:14 AM.

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