Page 1 of 1

how do you have a key downvariable in a draw actor?

PostPosted: Sat Jan 12, 2008 8:24 pm
by GuitarManGuitar
how do you have a key down variable without having to have it as an event?

like...

if(keydown(left))
d1=-2;

If you know plz tell me!!! :| :| :|

Re: how do you have a key downvariable in a draw actor?

PostPosted: Sun Jan 13, 2008 2:43 am
by makslane
Use the GetKeyState function:

Code: Select all
char *key = GetKeyState();

if(key[KEY_LEFT])
{
  d1=-2;
}


More info:
http://game-editor.com/docs/script_refe ... etkeystate

Re: how do you have a key downvariable in a draw actor?

PostPosted: Sun Jan 13, 2008 3:42 am
by GuitarManGuitar
tyvm!!!