Key Binding???

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

Silver_Ibex

Member
Feb 27, 2001
654
0
16
How do I bind a key so when I press it, it executes one command and then when the key is released, it executes another?
 

LoTekK

Peon
Jul 26, 2001
1,385
0
0
Washington, DC
use the "onrelease" command... i can't remember the syntax (need... sleep...) but essentially you have:

set input f1=behindview 1 | onrelease behindview 0

which basically puts you in behindview as long as you hold down the f1 key...
 

Silver_Ibex

Member
Feb 27, 2001
654
0
16
I tried the above code and it’s not working, the action starts but never stops on the key release, below is a more detailed description of what I am trying to do.

First I bind the keys for my mod, the question marks are what needs filled in


class MyModKeys extends utextrakeybindings;

defaultproperties
{
SectionName="My_Mod_Keys"
LabelList(0)="Press for action set to true, release for action set to false "

AliasNames(0)="???????????"


Now in my new UTplayer pawn class I have the functions modify the common variable bAction.

exec function ActionStart()
{
bAction=true;
}
exec function ActionStop()
{
bAction=false;
}
 

Papapishu

我是康
Jun 18, 2001
2,043
0
0
42
void
www.vovoid.com
If you're making a mutator (or mod) and you want the player to bind and use a special key for an event, I suggest you check out Carry The Flag, which uses a rather good method.
It makes you being able to bind a key in the settings and when you press it it sends a console command to the game that you can catch in the mutator and give the right code...

I got this question once before, when I had my SDK available, (which I don't right now, as I'm a the local library...(The suckers doesn't even have UT :p))

Check out the thread...