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

  • 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.

-ErrorX-

New Member
Nov 11, 2009
8
0
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.
 

Angel_Mapper

Goooooooats
Jun 17, 2001
3,532
3
38
Cape Suzette
www.angelmapper.com
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.