Originally Posted by
TWC_Flug
Code:
string filepath_mis = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/1C SoftClub/il-2 sturmovik cliffs of dover/missions/multi/mymissionfolder/mymission.mis";
Since patch 007 there's a mission property PathMyself, which allows for better portability than the literal "missions/multi/mymissionfolder/mymission.mis":
Code:
*** Mission Scripting API: AMission, new property 'string PathMyself'
Contains the (relative) path/filename to the mission script itself.
class Mission : AMission {
...
SomeFunc()
{
GamePlay.gpLogServer(null, this.PathMyself, new object[] { }); /// output: "missions\server\MyMission\MyMission.cs"
}
...
}
Code:
filepath_mis = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "/1C SoftClub/il-2 sturmovik cliffs of dover+"/"+Path.GetDirectoryName(this.PathMyself)+@""+Path.GetFileNameWithoutExtension(this.PathMyself)+".mis"
Bookmarks