![]() |
How to get mission file name?
How to get mission file name by script please?
|
Quote:
|
Quote:
|
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 |
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.
|
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. |
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) |
Hmm, weird.
You do add the reference with double slash (looks like commented out to me)? No idea what could be wrong. :( |
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? |
All times are GMT. The time now is 08:24 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.