- hold d + hold 2 + Left = combination 1
- hold a + hold 2 + Left = combination 2
Left button will have it's original function if none of the combinations above are held down.
For the context, I'm using this for a fighting game.
Code: Select all
; a move (facing right)
if (GetKeyState(d))
{
if (GetKeyState(2))
{
Left::
{
global MidComboSleep := 1
Send {d down}
Sleep MidComboSleep
Send {s down}
Sleep MidComboSleep
Send {d up}
Sleep MidComboSleep
Send {a down}
Sleep MidComboSleep
Send {s up}
Sleep MidComboSleep
Send {a up}
Sleep MidComboSleep
Send {d down}
Sleep MidComboSleep
Send {d up}
Sleep MidComboSleep
send {Left down}
sleep MidComboSleep
send {Lefts up}
sleep MidComboSleep
return
}
}
}
; a move (facing left)
if (GetKeyState(a))
{
if GetKeyState(2)
{
Left::
{
global MidComboSleep := 1
Send {a down}
Sleep MidComboSleep
Send {s down}
Sleep MidComboSleep
Send {a up}
Sleep MidComboSleep
Send {d down}
Sleep MidComboSleep
Send {s up}
Sleep MidComboSleep
Send {d up}
Sleep MidComboSleep
Send {a down}
Sleep MidComboSleep
Send {a up}
Sleep MidComboSleep
send {Left down}
sleep MidComboSleep
send {Left up}
sleep MidComboSleep
return
}
}
}
If I merge them by using 1 (Left ::) and putting it at the topmost position in the nested ifs the code doesn't work.
If I use (~Left ::) instead the Left input is double, therefore the move won't be executed in-game.
How do I fix this?