UE2 - UT2kX command line parameters

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

shamussmith

New Member
Jun 24, 2009
4
0
0
Hi. I'm using the UnrealEngine2 Runtime Demo and want to set two parameters via the commandline:

e.g. UE2Runtime.exe myMap <para1> <para2>

I'm extending RTPawn and would like to query the value of the parameters in PreBeginPlay or some similar function to set some global variables :eek:

Ideally I'll like my own parameters but am happy to hijack others that already exist.

All I need are two integers.

I've searched (a lot!) and there seems to be little info on command parameters/options/switch etc.

Help :D

Shamus
 
Last edited:

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Use the URL parameter pattern, otherwise UnrealScript will have no access to the values:
Code:
UE2Runtime.exe MapName?param1=value1?param2=value2
These values are definitely accessible via the first parameter of GameInfo.InitGame(). In UT200x you could use the GetUrlOptions() function to access URL parameters directly, but this function doesn't seem to exist in the Runtime. You could try the GetURLMap() function or Level.GetLocalURL() instead, but I'm not sure what these will return in the Runtime.