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
  #8  
Old 10-16-2012, 06:38 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default

Thanks Salmo, will test tonight. With regards to mission number.. well I can't say it is always mission 3 or mission 12. As the game goes on missions load and count in and the mission number can be mission 256

Anyways I will test that tonight. it is clean and looks like it will do the job.

My other way I looked at today was this but have not tested yet.

The below code removes all objects loaded in the mission that are from a country. example de

Code:
    Dictionary<GroundStationary, int> StationaryMisRelation = new Dictionary<GroundStationary, int>();
    //Section 1: Trigger Nachrichten

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

        if ("DeleteTrigger".Equals(shortName) && active)			//Trigger 1 Nachricht
        {
		    foreach (KeyValuePair<GroundStationary, int> kvp in StationaryMisRelation)
            {
                GamePlay.gpLogServer(null, "Stationary: {0}; MissNr.: {1}", new object[] { kvp.Key.Title, kvp.Value });
            }
            Timeout(20, () =>
            {
                GamePlay.gpGetTrigger(shortName).Enable = false;
            });
        }
		

    }	


	// Destroy all [Stationary] objects for country de  (germany)
    public void RemoveStaticAt(string country)  //not sure if this will work.  
    {


        foreach (GroundStationary stationary in GamePlay.gpGroundStationarys(country))
        {
            country = de;
            {
                stationary.Destroy();
            }
        }
    }
__________________
__________________
Win7, 64bit Ultra
Asus P8P67Pro MB
Intel i7-2600K
Coursair 16GB (4x 4GB), DDR3-1600MHz
Gainward Nvidia 580GTX 3GB DDR5
850-Watt Modular Power Supply
WIN7 and COD on Gskill SSD 240GB
40" Panasonic LCD
TrackIR5 +
Thrustmaster Warthog stick, throttle & pedals
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 12:59 AM.


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