YinYin is offline.

Double Key Inputs

Davis: hit_Fa:

The LF2 script engine provides us 3 simultaneous single and 7 simultaneous triple key inputs. The triple ones can be pushed in sequence too, but it's the simultaneous feature that's of interests now. If you don't know about these you better go to LFE and revise your basics instead of reading this.
I have found a way to fill the gap and achieve simultaneous double key inputs. Of course they don't work with a simple tag as the others do and instead use an exploit. I will now explain how it works. If you are not interested in the details you can skip right to the Summary to see a list of all the usable double key inputs I have found and how to implement them. However there may be more you can only find on your own if you understand how this works.


There are several basic character actions that don't require any special tags inside the data to work. These are all the basic attacks, jumping, dashing, flipping, defending and rolling. Original data will never contain any tags leading to these frames and yet they work when you push the respective buttons, which means these inputs work in a very different way. And you will find out just how different if you do include hit_tags for these buttons in the basic frames. However not to the original frames of course, otherwise you wouldn't notice any difference.

The easiest one to test this is the jump action in frame 210. Add a hit_j: 55 in all standing and walking frames:

<frame> 0 standing pic: 0 state: 0 wait: 3 next: 1 hit_j: 55 ... <frame> 5 walking pic: 4 state: 1 wait: 3 next: 999 hit_j: 55 ...
<hover to view code>
Template experiment

The character will now start drinking when you press the jump key. It seems as if the basic connection to frame 210 is being overridden, but if you press jump and attack at the same time you will still go to frame 210. And this is already all there is to it. The conclusion to this experiment is: the starting frame for the simultaneous input of jump and attack during a frame in state 0 or 1 is always frame 210. Now you may of course not want to have a character that drinks air whenever you press jump and can only jump by pressing jump and attack at the same time. To clean this up I like to simply give the original jump frame the number 209 and make the jump button inside the standing and walking frames lead there. Now the character can jump normally and has a new action on frame 210:

<frame> 0 standing pic: 0 state: 0 wait: 3 next: 1 hit_j: 209 ... <frame> 5 walking pic: 4 state: 1 wait: 3 next: 999 hit_j: 209 ... <frame> 209 jump pic: 60 state: 4 wait: 1 next: 211 ... <frame> 210 JA_action ...
<hover to view code>

To make sure the character won't be able to jump right after picking a heavy weapon now you will also need to change the next in frame 117 to 14.

As you have noticed this technique requires you to start the original action meant for the single key on a different frame. In this case this is not a problem. Unfortunately most other basic actions have special properties concerning their first frame. The attack button for example can lead to many different frames:

The dash frames have a launch speed set in the header of the character and the character is able to switch between them by turning. The defense frame allows the character to turn and goes to frame 111 when hit from the front. You will loose all of these features by simply adding a hit_tag to your basic frames. The random/conditional first frame feature of the attack button can be retained most of the time by adding the relocating hit_tag into the first frame rather than the basic frames. But the actions that have special features attached right to the first frame cannot be relocated without loss. This only leaves the rolling frame and the flip frames to work without complications. The latter ones may not be that interesting unless your character has a move that allows him to trip and fall on purpose, but the rolling frame can give you a flawless simultaneous input of defend and attack during a frame in state 2.

The summary below will show you how to implement all kinds of double key inputs.


The following double key inputs are all the ones that I think are useful or have the potential to be. I have underlined all the important things in the code samples. If a number is underlined you need to use the exact same value in your code. If a tag is underlined you may use any value you like, but it needs to match up the same way it does in the example. Also if the code includes a standing, walking or running frame you will need to modify all standing, walking or running frames the same way.

JA: Jump & Attack

<frame> 0 standing pic: 0 state: 0 wait: 3 next: 1 hit_j: 209 ... <frame> 5 walking pic: 4 state: 1 wait: 3 next: 999 hit_j: 209 ... <frame> 117 picking_heavy pic: 60 state: 15 wait: 2 next: 14 ... <frame> 209 jump pic: 60 state: 4 wait: 1 next: 211 ... <frame> 210 JA_action ...
<hover to view code>

This is my most favourite one as it's the only one working right from the standing frames without complications. I like using it for direct access to the super punch or putting a minor special move on it.

>>DA: Run + Defend & Attack

<frame> 9 running pic: 20 state: 2 wait: 3 next: 0 hit_d: 99 ... <frame> 99 rowing pic: 58 state: 6 wait: 2 next: 103 ... <frame> 102 >>DA_action ... <frame> 215 crouch pic: 60 state: 15 wait: 2 next: 999 hit_d: 99 ...
<hover to view code>

This input is very useful to give your character either an alternate run attack or a different dodge action.

>>JA: Run + Jump & Attack

<frame> 89 dash_attack pic: 106 state: 15 wait: 3 next: 91 ... <frame> 90 dash pic: 63 state: 15 wait: 1 next: 96 hit_a: 89 ... <frame> 96 >>JA_action ...
<hover to view code>

This one is very useful for an alternate dash attack. Many good players already use this input all the time to perform their dash attacks as quick as possible. Why not also reward them with a different action.

J+DA/JA: Jump + Defend & Attack or Jump & Attack

<frame> 79 jump_attack pic: 14 state: 3 wait: 2 next: 81 ... <frame> 80 jump pic: 62 state: 15 wait: 1 next: 82 hit_a: 79 ... <frame> 82 DA/JA_action ...
<hover to view code>

This one works like a charm, but in game is a little too awkward to use and on top of that a little irritating as it allows two different inputs for the same result. For these reasons I would not use it myself.

DA: Defend & Attack

<frame> 107 DA_action ... <frame> 110 standing pic: 0 state: 15 wait: 1 next: 107 hit_d: 118 ... <frame> 118 defend pic: 56 state: 7 wait: 12 next: 999 ...
<hover to view code>

If you can live with an unturnable defense and have something very special in mind for the DA action itself you can try to use this. Otherwise I would suggest you to not use it, because the drawbacks aren't worth this new input in my opinion.

Maveric: character collaboration sprited by Matt