Announcement

Collapse
No announcement yet.

Username integrated into Menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Username integrated into Menu

    Is there any way you can integrate your username into the Main Menu, sorta like a game lobby where it has your gamertag like in the top right corner of the screen?

    #2
    This should be relatively easy to do. Off the top of my head, it seems you would simply need to get the user name via UnrealScript, then you can assign it to a Flash text field or CLIK label via SetText.

    For instance, if you used a basic Flash text field on the root of the movie timeline, you could use this UnrealScript to assign a string to it:

    var GFxObject DisplayUserName;
    DisplayUserName = GetVariableObject("_root.myTextField");
    DisplayUserName.SetText(userName);

    Assuming A.) your text field in Flash has an instance name of 'myTextField' and B.) userName holds the users name derived via some UnrealScript function to get it.

    Comment


      #3
      PHP Code:
      class MyMoviePlayer extends GFxMoviePlayer;

      var 
      GFxObject Main_MenuUser;
      var 
      string SteamUserName;

      function 
      bool Start(optional bool StartPaused false)
      {
          
      local PlayerReplicationInfo PRI;
          
      local PlayerController PC;

          
      super.Start();
          
          
      PC GetPC();
          
      PRI PC.PlayerReplicationInfo;

          
      SteamUserName PRI.PlayerName;
          
          
      Advance(0);

          
      Main_MenuUser GetVariableObject("_root.SteamUserName");
          
      Main_MenuUser.setText("Logged in as: " SteamUserName);

          return 
      true;

      Comment

      Working...
      X