![]() |
|
|
|
#1
|
|||
|
|||
|
Used to do that but it forces you to predict where the user will copy/install your missionfile.
Instructions aren't often read nowadays. This other way is more solid.
__________________
|
|
#2
|
|||
|
|||
|
Thankyou Oden. I've tried pasting the code below into the OnBattleStart. It gives errors & I can't figure out how to reference the gamePlay.dll even when I look at your examples.
Code:
if (GamePlay is GameServerDef)
{
GameServerDef gameServer = (GameServerDef)GamePlay;
ISectionFile missFile = gameServer.game.FirstMissionFile();
//int n = missFile.lines("FrontMarker");
//GamePlay.gpHUDLogCenter("FrontMarker " +n.ToString());
readMission(missFile);
};
if (GamePlay is GameSingleDef)
{
GameSingleDef gameServer = (GameSingleDef)GamePlay;
ISectionFile missFile = gameServer.game.FirstMissionFile();
//int n = missFile.lines("FrontMarker");
//GamePlay.gpHUDLogCenter("FrontMarker " + n.ToString());
readMission(missFile);
};
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash. Get the latest COD Team Fusion patch info HERE |
|
#3
|
|||
|
|||
|
Hmm, weird.
You do add the reference with double slash (looks like commented out to me)? No idea what could be wrong.
__________________
|
|
#4
|
|||
|
|||
|
theOden,
I've been looking for a solution to get the (main) mission file too. I get an error message informing me the object implementing the "ISectionFile" interface is not marked as serializable (the error is thrown when invoking "ISectionFile missFile = gameServer.game.FirstMissionFile();"). Seems it can't be remoted from the sim AppDomain ... Would you mind sending the whole .cs file?
__________________
Core i7 3930K @ 4.8GHz; 16Gb DDR3 (Vengeance); nVidia GTX580; OS disk: 150Gb 10000rpm; SIM disk: 300Gb 10000rpm; Windows 7 x64 Ultimate Last edited by moggel; 12-04-2012 at 04:20 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|