PDA

View Full Version : Name of the map


TaoPaiPai
25th Sep 2001, 01:26 PM
Is there an easy way to get the filename of the map being played or do I have to manually parse the URL I got from level.getLocalUrl()
?
(this kind of operations often lead to unexpected bugs so I would prefer to avoid it :) )

TaoPaiPai
25th Sep 2001, 01:33 PM
Disregard,I found it.
You could use the parseoption(String url,string keyToFind)
To find an option value in a game url,but It's not really necessary since the filename is just the first sequence of letters before a "?".
:)
(for the record the option 'keys' are:
game,mutator,name,class,face,skin,voice )

ca
25th Sep 2001, 06:12 PM
GetMapURL() is what I've used, didn't have to parse it. Check out the UTMenu code for the practice window or something and see how mek got the name of the maps, or maybe in the scoreboard...

TaoPaiPai
25th Sep 2001, 07:12 PM
It must be getUrlMap() :D
Yes I'll give it a try,it is in actor and there are a bunch of interesting file-related functions there.
Thank you.