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.

UE3 - General Variable that not get delete from a map switch

Discussion in 'Programming' started by -ErrorX-, Dec 1, 2011.

  1. -ErrorX-

    -ErrorX- New Member

    Joined:
    Nov 11, 2009
    Messages:
    8
    Likes Received:
    0
    Hi All,

    Is there class in unreal that is not getting delete if you do a map switch, so that I can define a variable in it.
    I trying to make player spawn on the same spot if he does a map switch.
     
  2. Narayana

    Narayana New Member

    Joined:
    Jun 16, 2009
    Messages:
    19
    Likes Received:
    0
    Write to an ini if writing to the player profile does not work
     
  3. Angel_Mapper

    Angel_Mapper Goooooooats

    Joined:
    Jun 17, 2001
    Messages:
    3,532
    Likes Received:
    3
    You'll want a custom gametype running, and you can pass a parameter that can be read by the next map. For example, to send the information when you're loading the next level, you would do something like this:

    Code:
    WorldInfo.ServerTravel(NextMapName $ "?StartTag=" $ PlayerStartTag);
    PlayerStartTag would be pulled from the PlayerStart's Tag property which you would have to fill out for each PlayerStart you wanted to support this. Then, in your custom GameInfo you would pull this information in InitGame:

    Code:
    event InitGame(string Options, out string ErrorMessage)
    {
        super.InitGame(Options, ErrorMessage);
        PlayerStartTag = ParseOption(Options, "StartTag");
    }
    You could then pass that directly to the FindPlayerStart function as the optional parameter IncomingName.
     

Share This Page