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

Game Editor comments and discussion.

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

Postby GuitarManGuitar » Sat Jan 12, 2008 8:24 pm

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!!! :| :| :|
GuitarManGuitar
 
Posts: 31
Joined: Thu Oct 25, 2007 11:57 pm
Score: 0 Give a positive score

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

Postby makslane » Sun Jan 13, 2008 2:43 am

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
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

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

Postby GuitarManGuitar » Sun Jan 13, 2008 3:42 am

tyvm!!!
GuitarManGuitar
 
Posts: 31
Joined: Thu Oct 25, 2007 11:57 pm
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron