How to test for 2 key presses
Posted: Wed Jun 30, 2004 12:57 am
I understand how to check for a Key press, but how would I check for two Key presses?
if (KEY_1 && KEY_2)
do something
TIA
if (KEY_1 && KEY_2)
do something
TIA
Game Editor discussion board
http://game-editor.com/forum/
char *key = GetKeyState();
//Catch a+s keys
if(key[KEY_a] && key[KEY_s])
{
//Action for a+s
}
//Catch a+d keys
if(key[KEY_a] && key[KEY_d])
{
//Action for a+d
}