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.

I know i posted here alot lately but:

Discussion in 'Programming' started by LedZep, Feb 24, 2002.

  1. LedZep

    LedZep k last title kinda gay :p

    Joined:
    Jan 23, 2002
    Messages:
    446
    Likes Received:
    0
    I have a question:
    how do i get to bring up a menu in game (in a mutator) kind of like the menu in WFUT or TFC.

    please help
     
  2. Smart

    Smart Just trying to live up to the name

    Joined:
    Feb 17, 2002
    Messages:
    6
    Likes Received:
    0
    There's a tutorial about making a mutator menu at chimeric... dont know if that helps though oO
     
  3. RegularX

    RegularX Master of Dagoth Lies

    Joined:
    Feb 2, 2000
    Messages:
    1,215
    Likes Received:
    0
    Do you mean the menu under "Mod" in the standard window or a windwo that gets pulled during the game (like WFUT)

    The first is easy, the second isn't. UScript was little in theway of a framework for using windowing in between the client and server.


    Your best bet (for the latter) is to look up WndowReplicationInfo or WRI.

    rgx
     
  4. LedZep

    LedZep k last title kinda gay :p

    Joined:
    Jan 23, 2002
    Messages:
    446
    Likes Received:
    0
    Actually, I need both menu under the "mod" and an ingame menu like in WFUT.

    i barely have an idea how to do either one, can someone help me with those? I do know i need to subclass WindowFramedWindow, UWindowDialogClientWindow, and MenuModMenuItem but im not even sure about that.
    help please
     
  5. mr.s-d

    mr.s-d CHiMERiC Moderator

    Joined:
    Aug 30, 2001
    Messages:
    65
    Likes Received:
    0
    For in-game menu, subclassing SpeechWindow often provides all the functionality you need. To show it on screen you can do the following (code assumes it's in a PlayerPawn class, wouldn't take much to tweak it to work from somewhere else):
    Code:
      local UMenuRootWindow ParentWindow;
    
        ParentWindow = UMenuRootWindow(WindowConsole(Player.Console).Root);
        if(MM == None)
        {
          MM = MainMenu(ParentWindow.CreateWindow(Class'BloodCrusade.MainMenu', 100, 100, 200, 200));
          MM.bLeaveOnScreen = True;
        }
        WindowConsole(Player.Console).Root.SetMousePos(0, 132.0 / 768 * WindowConsole(Player.Console).Root.WinWidth);
        if (ChallengeHUD(myHUD) != None)
          ChallengeHUD(myHUD).bHideCenterMessages = True;
        MM.SlideInWindow();
        WindowConsole(Player.Console).bQuickKeyEnable = True;
        WindowConsole(Player.Console).LaunchUWindow();
    
     
  6. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    just added a little:
    this will make the function get called client side (client will execute the code when server calls it).
    This is not necissery if you are already in a function that is executing client side.
    i.e: HUD, or HUDMutator (in the case of a mutator).

    Code:
    replication
    {
      // Functions server can call.
      reliable if( Role==ROLE_Authority )
        OpenTheMenu;
    }
    
    function OpenTheMenu()
    {
      local UMenuRootWindow ParentWindow;
    
        ParentWindow = UMenuRootWindow(WindowConsole(Player.Console).Root);
        if(MM == None)
        {
          MM = MainMenu(ParentWindow.CreateWindow(Class'BloodCrusade.MainMenu', 100, 100, 200, 200));
          MM.bLeaveOnScreen = True;
        }
        WindowConsole(Player.Console).Root.SetMousePos(0, 132.0 / 768 * WindowConsole(Player.Console).Root.WinWidth);
        if (ChallengeHUD(myHUD) != None)
          ChallengeHUD(myHUD).bHideCenterMessages = True;
        MM.SlideInWindow();
        WindowConsole(Player.Console).bQuickKeyEnable = True;
        WindowConsole(Player.Console).LaunchUWindow();
    }
    
     
  7. mr.s-d

    mr.s-d CHiMERiC Moderator

    Joined:
    Aug 30, 2001
    Messages:
    65
    Likes Received:
    0
    Oops, forgot that (though the function I cut & pasted from doesn't need it), and
    Code:
    var MainMenu MM;
    
    Saves having to spawn a new menu every time you want to show it on screen.
     
  8. LedZep

    LedZep k last title kinda gay :p

    Joined:
    Jan 23, 2002
    Messages:
    446
    Likes Received:
    0
    thanks people, i dont need the mod menu anymore but I do need the ingame menu (like the one in WFUT), Menus are completely new to me so can you guys help me out with the code allitle bit and explain it to me (basically, i want to have an ingame menu EXACTLY like the one in WFUT except that instead of special attributes, it would have a list of orders, kind of like the original UT voice menu but without the fancy animations and stuff)
     

Share This Page