1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Name of the map

Discussion in 'Programming' started by TaoPaiPai, Sep 25, 2001.

  1. TaoPaiPai

    TaoPaiPai Commisaire Van Loc

    Joined:
    Jun 13, 2000
    Messages:
    1,626
    Likes Received:
    0
    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 :) )
     
  2. TaoPaiPai

    TaoPaiPai Commisaire Van Loc

    Joined:
    Jun 13, 2000
    Messages:
    1,626
    Likes Received:
    0
    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 )
     
  3. ca

    ca CHiMERiC Grandmaster

    Joined:
    Oct 11, 1999
    Messages:
    84
    Likes Received:
    0
    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...
     
  4. TaoPaiPai

    TaoPaiPai Commisaire Van Loc

    Joined:
    Jun 13, 2000
    Messages:
    1,626
    Likes Received:
    0
    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.
     

Share This Page