Announcement

Collapse
No announcement yet.

Separate keybinds for Avril and Redeemer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Separate keybinds for Avril and Redeemer

    So I don't play this game so much these days, but a conversation on a site that rhymes with pooboob with a warfareboss whose name rhymes with yarrr brought up the question of how to bind separate keys for Avril and Redeemer — which would be a nice thing since it would make you a little quicker on the draw with the Redeemer.

    If I remember right, UT2004 and earlier had the GetWeapon command, which would accept a weapon's class name, so you could do

    Code:
    "GetWeapon XWeapons.Redeemer"
    "GetWeapon Onslaught.ONSAVRiL"
    Now I'm not sure but I think that for some fakaktawack reason they left GetWeapon out of UT3. At least, I can't google up any mention of it, and I can't find it anywhere in the source code. If it does work somehow I guess the INI lines would just be

    Code:
    Bindings=(Name="X",Command="GetWeapon UTGame.UTWeap_Redeemer")
    Bindings=(Name="Y",Command="GetWeapon UTGame.UTWeap_Avril")
    if that still works then great, but ... methinks it won't =(



    The only less-perfect alternative I can think of would be to hack together a filthy little state machine that binds two keys, one to a single weapon-switch, and another to a double weapon-switch, which then also automatically rebinds each key as necessary to give the desired effect.

    Such a logical monstrosity might go something like this:

    Code:
    Bindings=(Name="AR_DoSwitchWeaponOnce",Command="GBA_SwitchWeapon10")
    Bindings=(Name="AR_DoSwitchWeaponTwice",Command="GBA_SwitchWeapon10 | GBA_SwitchWeapon10")
    
    Bindings=(Name="AR_DefaultState_X",Command="AR_DoSwitchWeaponOnce | AR_GoToState_Inverted")
    Bindings=(Name="AR_DefaultState_Y",Command="AR_DoSwitchWeaponTwice")
    Bindings=(Name="AR_InvertedState_X",Command="AR_DoSwitchWeaponTwice") 
    Bindings=(Name="AR_InvertedState_Y",Command="AR_DoSwitchWeaponOnce | AR_GoToState_Default")
    
    Bindings=(Name="AR_DefaultState_Bind_X",Command="SetBind X AR_DefaultState_X")
    Bindings=(Name="AR_DefaultState_Bind_Y",Command="SetBind Y AR_DefaultState_Y")
    Bindings=(Name="AR_InvertedState_Bind_X",Command="SetBind X AR_InvertedState_X")
    Bindings=(Name="AR_InvertedState_Bind_Y",Command="SetBind Y AR_InvertedState_Y")
    
    Bindings=(Name="AR_GoToState_Default",Command="AR_DefaultState_Bind_X | AR_DefaultState_Bind_Y")
    Bindings=(Name="AR_GoToState_Inverted",Command="AR_InvertedState_Bind_X | AR_InvertedState_Bind_Y")
    
    Bindings=(Name="X",Command="AR_DefaultState_X")
    Bindings=(Name="Y",Command="AR_DefaultState_Y")
    Selecting any of the other weapons should always revert the Avril-Redeemer bindings to their default state, so pipe an "AR_GoToState_Default" to the end of each of their bound commands:

    Code:
    Bindings=(Name="one",Command="GBA_SwitchWeapon1 | AR_GoToState_Default")
    Bindings=(Name="two",Command="GBA_SwitchWeapon2 | AR_GoToState_Default")
    and so on.



    Caveat lusor:
    • The above should work as expected whenever you actually have the weapons you mean to switch to; however, the keybinds have no way to know whether you actually have the desired weapon or not, or whether pressing the bound key will actually have any effect. Therefore, pressing a key without the weapon being available can corrupt the implied state, and this can cause problems. For example, if you have an Avril and no Redeemer then pressing the Redeemer key would switch to Avril instead of doing nothing, and vice versa.
    • Worse, suppose you have neither weapon, and press the Avril key (to no apparent effect), then pick up both Avril and Redeemer, and then press either the Avril or Redeemer key, the keybinds will be reversed until you switch to a different weapon.
    • Another scenario: enter a vehicle (or mount hoverboard) with Avril in hand, then press a weapon key (e.g. to switch seats, or just accidentally), then hop back on your feet ... you'll whip out the Avril, but your Avril/Redeemer keybinds will be reversed, again, until you switch to a different weapon.
    • Godknowshowmany other screwball scenarios may exist as well.
    • 100% of this poosauce is off the top of my head. Or possibly out the bottom of my bottom. Every line of everything is 200% half-baked and is completely theoretical and untested. Try at own risk. Do not mix with alcohol.


    If someone knows a better way to do this or can point out any mistakes, please shower us with your golden smartness.

    #2
    i'[ve secretly wished for this very thing. i love your disclaimer.

    Comment


      #3
      Anyone try this yet? I'm too lazy these daze

      Comment

      Working...
      X