#1
|
|||
|
|||
How to get mission file name?
How to get mission file name by script please?
__________________
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 |
#2
|
|||
|
|||
A sub mission file name that you are loading or the main mission file that is running from start?
__________________
__________________ 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 |
#3
|
|||
|
|||
Get the main mission file that is running from start while it's running.
__________________
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 |
#4
|
|||
|
|||
This is how I do in my BoB5 campaign:
Quote:
Edit: you might need this reference above public class Mission: [//$reference parts\core\gamePlay.dll] Download and copypaste whatever if it helps: download
__________________
Last edited by theOden; 11-25-2012 at 08:01 PM. |
#5
|
|||
|
|||
Another easy way is just set a const string and ref that when you need to. This works if you have a .cs for that mission.
__________________
__________________ 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 |
#6
|
|||
|
|||
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.
__________________
|
#7
|
|||
|
|||
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 |
#8
|
|||
|
|||
Hmm, weird.
You do add the reference with double slash (looks like commented out to me)? No idea what could be wrong.
__________________
|
#9
|
|||
|
|||
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. |
|
|