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.

UE3 - UDK Interaction Class

Discussion in 'Programming' started by Bulska, Apr 11, 2010.

  1. Bulska

    Bulska Just me

    Joined:
    Nov 2, 2009
    Messages:
    5
    Likes Received:
    0
    I've been working on something for UDK for quite awhile now and I've bumped into a problem I have a hard time finding an answer for, even though it's actually quite basic.

    What I need is a pop-up menu that appears when the player presses F12 or the right mouse button when he's holding a specific weapon...
    The menu is just a list of options being shown on the side of the screen.
    Pressing a number on the players keyboard will choose one of these options.
    The player can close the menu the same way as he can open it. It can also close with certain options the player can choose out of the menu.

    To make this, I decided to use a class extending the Interaction class.
    I've already programmed the handling of input and showing the right options, but I have trouble with a few things::

    - Refering to the viewport owner's Pawn and PlayerReplicationInfo
    - The actual event that is called when the player presses a key on his keyboard.
    - How to check what weapon the player's pawn is holding
    - How to check wether or not the key input is 'escape' or 'right mouse button'
    - A way to convert the key input to an Int value.

    I think these problems are pretty basic, but I've got a hard time finding what are the correct functions and variables to use.
    Many other parts for this project can't be tested because this isn't finished yet. When I get this menu working, I can finally move on with so many more other parts.

    Could anyone help me out and explain to me how I can make the specific things I need? It'd help me a lot!

    If you need to look at the .uc file (17kb) I've been working on so far, send me a PM about it.
     
  2. Bulska

    Bulska Just me

    Joined:
    Nov 2, 2009
    Messages:
    5
    Likes Received:
    0
    Seems this problem isn't as basic as I thought seeing the small amount of responses.
     
  3. Dakatsu

    Dakatsu Elite Nova Corps Member

    Joined:
    Mar 25, 2005
    Messages:
    15
    Likes Received:
    0
    I could be wrong, but if I am right nothing is called just by pressing a key. The input.ini has a list of the keys and the command that they should execute when pressed.
     
  4. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,912
    Likes Received:
    35
    Interactions can receive raw input events, so technically you could hard-wire an action to a key press, although that may be somewhat impractical for the user.
     

Share This Page