Function or variable for map filename? - SOLVED

Discussions about Coding and Scripting
Post Reply
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Function or variable for map filename? - SOLVED

Post by Aldebaran »

I need in uscript the filename of the actually played map.
I found the Worldinfo object but this seems to work only with later ut, not ut99.
And the GameReplicationInfo object seems not to have the filename.
Last edited by Aldebaran on Sun Sep 18, 2016 12:52 pm, edited 1 time in total.
User avatar
sektor2111
Godlike
Posts: 6410
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Function or variable for map filename?

Post by sektor2111 »

Use search button or... Hint check NsTDM from TeamGame...Plus or Minus thread all my last game-type shows MapName when action is about to start. Do you read forum generally ? I'm asking because it was a thread where Barbie has come with another solution...
Aldebaran
Masterful
Posts: 672
Joined: Thu Jan 28, 2016 7:30 pm

Re: Function or variable for map filename?

Post by Aldebaran »

Thank you! I myself would never have guessed there...

Your code worked for me.

Code: Select all

local StatLog SL;
local string MapFilename;

SL = Spawn(class'StatLog');
if ( SL != None )
{
         MapFilename = SL.GetMapFileName();
         SL.Disable('Timer');
         SL.Destroy();
}
Last edited by Aldebaran on Fri Nov 18, 2016 5:08 pm, edited 7 times in total.
User avatar
Barbie
Godlike
Posts: 2802
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Function or variable for map filename?

Post by Barbie »

"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Post Reply