Quote:
Originally Posted by FG28_Kodiak
There is no way to get the MissionfileName from a script (i am looking for it too), via CloDo - API
It would be possible (i think) if we can create Addins for Multiplayer, to get the current directory.
IGame:
gameInterface.ToFileSystemPath(..)
|
Sounds interesting. Where can I obtain IGame objects? I've found the type and apparently it inherits from IGamePlay. If I set a breakpoint in OnTickGame and cast it to IGame I do get an object but the IGame.BattleScriptFileName property is always null. I performed the test in SP mode. I then tried doing the same from OnBattleStarted() and OnBattleInit() but those never gets called.
I then performed the exact same test running a server thinking that maybe a "battle" is what gets started when you type "battle start" in the server console but ... no.
When are those methods called anyway?
By the way: I think we should set up a scripting WIKI...