Thank you. I have corrected my script to be as followed.
Code: Select all
$~d::
if( GetKeyState("s","p") )
{
send {d up}
send {a down}
}
else if( GetKeyState("w","p") )
{
send {a up}
send {d down}
}
return
$~d up::
if( GetKeyState("s","p") )
{
send {a up}
send {d up}
}
else if( GetKeyState("w","p") )
{
send {d up}
send {a up}
}
return
~s::
if( GetKeyState("d","p") )
{
send {d up}
send {a down}
}
else if( GetKeyState("a","p") )
{
send {a up}
send {d down}
}
return
~s up::
if( GetKeyState("d","p") )
{
send {a up}
send {d down}
}
else if( GetKeyState("a","p") )
{
send {d up}
send {a down}
}
return
$~a::
if( GetKeyState("s","p") )
{
send {d down}
send {a up}
}
else if( GetKeyState("w","p") )
{
send {a down}
send {d up}
}
return
$~a up::
if( GetKeyState("s","p") )
{
send {a up}
send {d up}
}
else if( GetKeyState("w","p") )
{
send {d up}
send {a up}
}
return
~w::
if( GetKeyState("d","p") )
{
send {d down}
send {a up}
}
else if( GetKeyState("a","p") )
{
send {a down}
send {d up}
}
return
~w up::
if( GetKeyState("d","p") )
{
send {a up}
send {d down}
}
else if( GetKeyState("a","p") )
{
send {d up}
send {a down}
}
return
And it work ok. The only problem now is when I alternate A and D, the vehicle heading will be stuck in a straight line for just a moment. I have no idea how to fix that problem.