View Single Post
  #108  
Old 05-16-2011, 11:42 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
Does the code you posted do this? I see mention of "BirthPlaces" in the script, but I don't see any "BirthPlaces" in the FMB.

Do you have a link to a tutorial on how to create multiplayer missions?
MP missions are different from SP only by this FMB object called "birthplace" (at least in Russian version) or spawnpoint in English I guess. You find it in Object Browser the same way as other objects like an airfield or a tank. In its property window you can select side it belongs to and list of aircraft available for players. In a mission consisting of many submissions you place birthplaces in the 1st 'main' mission. See my mission as example attached.

When new submission is loaded it can contain a new moved frontline and a new birthplace (e.g. red one) in the location where the blue one used to be. The problem is the old birthplace is not removed by loading a new submission and blue aircraft still can be created in the newly captured red airfield. That is why you need to destroy an old blue birthplace with a script I guess:
Code:
foreach (AiBirthPlace bp in GamePlay.gpBirthPlaces())
        {
            if (bp != null)
                bp.destroy();
         
        }
E.g. in my Repka mission we have both red and blue airfields in D3. The main mission loads 3 (will be 4 soon) relatively big submissions in itself and 2 small ones.

Ideally I would like to move the frontline and change side of these 2 birthplaces based on results of a recent submission. Say if reds loose more aircrafts or tanks (or more then say 70%) in recent mission reds loose an airfield in D3. If they win next mission they take it back, etc. and repeat it forever.

In the future I believe this script can be used to move frontline across the whole map to create an ongoing war.

Please find a recent version of my mission attached.
Attached Files
File Type: zip BoF1_1_7_04a.zip (18.6 KB, 11 views)

Last edited by Ataros; 05-16-2011 at 11:50 AM.
Reply With Quote