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
  #15  
Old 10-21-2011, 04:43 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Will take a look at it.

Short answers:
Code:
 public static string SubMissionsPath = @"missions\Multi\Dogfight\r_steppe\subs\";
    // is @ necessary here? did not use it in other missions.
With @ at the beginning you must not write \\ every time. The \ is a special character in C# (C, C++) and normaly for escape sequences \n newline for example. If you want to use \ in your string you must write \\ and to avoid the double use you can set a @ at the beginning of your string so \ is a normal character.

Code:
// what does this block do?
        public Mis(string Filename, string misType, int Lengh) // should I include all the above variables here?      
        {
            this.Missionfilename = Filename;  // You use mi.Missionfilename instead of mi.Filename in your example when load missions. Why?
            this.MissionLengh = Lengh;
            this.MissionType = misType;
            this.TrgWasTriggered = wasTriggered;
        }
this is a constructor of the class (you can also use more of them overloaded). It's usefull if you like to initialize more variables or making calculations etc.

So i can use
Code:
    public List<Mis> MissionPool = new List<Mis>()
    {
        new Mis ("Mission1.mis",SubMissionsPath ,1000.0),
        new Mis ("Mission2.mis",SubMissionsPath ,1000.0),
    };
to create several entries at one time.

// You use mi.Missionfilename instead of mi.Filename in your example when load missions. Why?
I use the public method Missionfilename to get access to the variable in the object. Filename is only used in the constructor to give the value to the variable Missionfilename.

More to come, must take a deeper look at it, but no time at the moment.
But it seems you think a bit too complicated
Reply With Quote
 

Thread Tools
Display Modes

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 01:27 AM.


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