Hi,
If someone is able to, could you save me some time and tell me how I can (within script) get the mission file name (or whole path of it that I can then split) please.
Thanks
(I can split it myself, just can't see where to grab it as a string)
Hi,
If someone is able to, could you save me some time and tell me how I can (within script) get the mission file name (or whole path of it that I can then split) please.
Thanks
(I can split it myself, just can't see where to grab it as a string)
Last edited by Yo-Yo; Mar-24-2023 at 09:15.
I am Yo-Yo not YoYo (that's someone else)
See if this post from Artist helps you:
https://theairtacticalassaultgroup.c...887#post387887
It helps a bit, I can put it as a message in the server with:
so this is the important bit:Code:GamePlay.gpLogServer(null, this.PathMyself, new object[] { }); /// output: "missions\server\MyMission\MyMission.cs"
But how do I get that to return the output in a string so I can use it? I have no idea what the 'null' is for, and 'object[]'? 'this' looks to be the mission, and 'PathMyself' is what I'm after?...Code:null, this.PathMyself, new object[] { }
I am Yo-Yo not YoYo (that's someone else)
Oh wait, it is so simple.
Code:string viewPath = this.PathMyself; Console.WriteLine("The path is " + viewPath);
I am Yo-Yo not YoYo (that's someone else)
Oh that's interesting, there's no need to use that 'this.' bit then, thanks.
In the end I used some split and casting to get what I needed.
When is this release due? Is it something to hold one's breath for, or just stay off the naughty list for the foreseable future?
I look forward to that variable along with truesky and temperatures linked to maps.
I am Yo-Yo not YoYo (that's someone else)
Also easier to write to log file like this:
GamePlay.gpLogServer(PathMyself);
Bookmarks