Sorry for doublepost, but i still have a problem. I want to be able to still get the correct key events when inchar is activated. I have functions like:
function isKeyWDown(){return key_pressed(w);}
but when inchar is active, key_pressed only returns true on the keydownpressed event and not all the time when a key is down...
EDIT:
Here is an example to clearify:
#include <acknex.h>
STRING* lastkey = "";
void getLastKey()
{
while(1)
{
inchar(lastkey);
wait(1);
}
}
function main()
{
level_load(NULL);
//getLastKey();
while(1)
{
if(key_pressed(key_for_str("a")))
draw_text("a is pressed", 10, 10, COLOR_RED);
wait(1);
}
}
just comment getLastKey() out to see the difference...