UE3 - UDK Interaction Class

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

Dakatsu

Elite Nova Corps Member
Mar 25, 2005
15
0
0
- The actual event that is called when the player presses a key on his keyboard.

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.