UE2 - UT2kX Accessing Systemtime/Gametime and Level Title

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

Superbabs84321

New Member
Oct 19, 2009
24
0
0
Does anyone know how I can access the systemtime or gametime from UnrealScript? And what about the level Title or Name? According to the wiki they should be part of the LevelInfo, but something like LevelInfo.Title or LevelInfo.Time doesn't get me any results.
 

Superbabs84321

New Member
Oct 19, 2009
24
0
0
Have a look at the various LevelInfo variables. The current map's LevelInfo is accessible from every actor via the Level variable, and most non-actor objects can get hold of an actor object somehow.

Ha! So I should have used Level.Title instead of LevelInfo.Title!

Anyways, for those interested this is the final code:

Code:
var () localized string SuperMessage

SuperMessage = Level.Title$"; "$Level.Hour$":"$Level.Minute$":"$Level.Second$"; "$Level.TimeSeconds$"; "$Message;

Result gives the following message (via FileLog.logf):

Untitled; 14:53:12; 26.12; Hello World!