News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 11th Apr 2010, 08:14 AM   #1
Bulska
Just me
 
Join Date: Nov. 2nd, 2009
Location: Somewhere in the Netherlands
Posts: 5
Question Interaction Class

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.
__________________
Bulska is offline   Reply With Quote
Old 20th Apr 2010, 09:41 AM   #2
Bulska
Just me
 
Join Date: Nov. 2nd, 2009
Location: Somewhere in the Netherlands
Posts: 5
Seems this problem isn't as basic as I thought seeing the small amount of responses.
__________________
Bulska is offline   Reply With Quote
Old 20th Apr 2010, 01:32 PM   #3
Dakatsu
Elite Nova Corps Member
 
Join Date: Mar. 25th, 2005
Posts: 15
Quote:
Originally Posted by Bulska View Post
- 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.
Dakatsu is offline   Reply With Quote
Old 21st Apr 2010, 04:11 AM   #4
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,785
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.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak/JDN | Unreal Wiki | Liandri Archives
Everything you ever wanted to know about replication| UnrealScript security considerations
<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> nono
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
Wormbo is offline   Reply With Quote
Reply

Tags
input, interaction, udk

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer