Name of the map

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

TaoPaiPai

Commisaire Van Loc
Jun 13, 2000
1,626
0
0
Matnik
Visit site
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

Commisaire Van Loc
Jun 13, 2000
1,626
0
0
Matnik
Visit site
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

CHiMERiC Grandmaster
Oct 11, 1999
84
0
0
www.unrealscript.com
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

Commisaire Van Loc
Jun 13, 2000
1,626
0
0
Matnik
Visit site
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.