No announcement yet.

Has anyone made a menu like "Speech Menu"?

  • Filter
  • Time
  • Show
Clear All
new posts

    Has anyone made a menu like "Speech Menu"?

    I'm looking to (if possible) make a quick reference menu for particular admin commands built in my own mutator so admins do not need to bring down the console and type everything out. I would prefer not to have some big gui pop up on the screen. The Speech Menu that comes up where you hit #1 - #7 and then hit a # in the submenus to pick something like a taunt.....That's the ideal type of graphical interface.

    I've tried searching some, but I can't seem to get far because anything related to a menu or gui that I find is an entire window of stuff that pops up to the front of the screen while gaming. Does anyone know how, or at least where I can go to find out how? I may have overlooked it, but I did not find anything on that in this forum, or at Wiki. Is that type of graphical interface referred to as something specific?

    Thanks for any help you can provide.

    Re: Has anyone made a menu like "Speech Menu"?

    Originally posted by bushbomb
    IDoes anyone know how, or at least where I can go to find out how? I may have overlooked it, but I did not find anything on that in this forum, or at Wiki. Is that type of graphical interface referred to as something specific?
    The code for the speech menu lives in ExtendedConsole.uc, check it out.


      That one is rather complex. Is anyone able to get me started? I see the draw canvas functions, but can't get it all to work.

      Can anyone post a simple example that when you hit a key, it comes up with a simple menu, maybe 3 items long, and when you it the "1" it just does something like say "hi".


        In order to get that to work in your mutator you will need to replace the console, which I dont think any cheat protections are going to let you do without kicking you (I know I used to check this back when I wrote cheat protection for UT99).

        But, Console is just a fancy itneraction (not even native). You can really just create an interaction, and make a menu similar to the speechmenu that intercepts key input like the console does.

        Basically, the menu keeps track of what level you are in currently, and presents an array of choices and draws them on the screen. When you press a number key, it checks to see what menu level it is in, and checks to see if your input matches one of those choices, and if it does it either runs the command or proceeds to the next level of the menu. Thats what you want to do


          I can make my own console commands, so I bring down console and type "mutate command parameters" with the following function:

          function Mutate (string MutateString, PlayerController Sender)

          I put a lots of "commands" in there, so I can type them in console, or bind a key, like in the user.ini "numpad1=mutate command parameters". My problem is that between all my other keybinds, I don't have enough room, and I don't want to memorize every single custom command keybind either. I would like to hit a key, like "Z" and a list pops up like:

          1. CommandA
          2. CommandB
          3. CommandC

          and if I hit "1" it gives me the next harcoded list like:

          CommandA Parameters...
          1. ParameterA
          2. ParameterB
          3. ParameterC

          and when I click "3" it does the same thing as if I brought down the console and type in "mutate commandA ParameterC" and hit enter. The speech menu is so complex because everything is dynamic in there. I just want a simple static list that never changes, but to simplify commands I made.


            Then take the speech menu code, and remove the dynamic things and replace them with static things, like an array of strings.


              I tried trimming it down, but I could not get it to work. I tried copying the entire file and just replaying "speechmenutoggle" with "zspeechmenutoggle" in the exec function speechmenutoggle but when I go in game and type "zspeechmenutoggle" in the console it says unknown command.


                what class is your code in? If its a subclass of ExtendedConsole, you'll need to set your console class to use your class instead of ExtendedConsole. I dont recommend doing it that way, though. Instead, extend Interaction and add it in (not sure how to add interactions, but check the wiki), make sure its working, and THEN try it.


                  Thanks for all the pointers, I got it setup to do exactly what I tried for and it works client side from the server. I know fully understand the entire speech menu stuff though

                  I made it extend interactions.