Weaponswap toggle = T
I want 1234 to all be made with weapon0
wryu to be made with weapon1
So T needs to precede the key only when changing from number attacks to letter attacks.
Example wrote: current Weapon=0
I press 3 4 3 w r 4 r r 2
Game should receive
3 4 3 Tw r T4 Tr r T2
This doesn't work, it both inserts T before every number, and never does for letters
Not sure what I'm doing wrong, but it's not flipping weapon:= ?
And is there a better way to handle all the keys I want than an individual section for each?
Code: Select all
#MaxThreadsPerHotkey 1
#UseHook 1
Global weapon:=""
W::
{
global weapon
{
If weapon:="0"
Send "{T}"
weapon:="1"
}
Send "{W}"
Return
}
R::
{
global weapon
{
If weapon:="0"
Send "{T}"
weapon:="1"
}
Send "{R}"
Return
}
4::
{
global weapon
{
If weapon:="1"
Send "{T}"
weapon:="0"
}
Send "{4}"
Return
}
3::
{
global weapon
{
If weapon:="1"
Send "{T}"
weapon:="0"
}
Send "{3}"
Return
}