Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / command for input on keyboard keys?

Author
Message
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 27th Oct 2003 22:16
hi, does anyone know the command used to allow input from other keys on the keyboard other than upkey etc which have their own commands, for example w to pivot an object up? thanks for your help
D I G I T A L
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location: Dubai, UAE
Posted: 27th Oct 2003 22:34
u can use the "INKEY$()" command, for example :
'if inkey$()="w" then do what ever u wana do"

‘Those who ignore the lessons of the past are doomed to repeat them’ (Napoleon)
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Oct 2003 22:48
You can use the KEYSTATE() and SCANCODE() functions ...



The numbers that you use can either be found using trial and error, a bitmap that shows the layout that is laying around somewhere, or by searching for 'Scancode' in the CodeBase where they are all named for you
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 27th Oct 2003 22:56
thanks guys, that worked fine, although my code seems to be wrong as the model will be facing in one direction, and then when i roll or pivot the model it changes to the direction it first loaded, and not from where the object is facing at the current time.
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 27th Oct 2003 23:05
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 27th Oct 2003 23:05
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Oct 2003 09:24
Known problem - see the bug forum
feiting
21
Years of Service
User Offline
Joined: 19th Oct 2003
Location:
Posted: 28th Oct 2003 09:34
inkey$() has problems. Use ScanCode or maybe Keystate...

Inkey just won't let you hit 2 buttons at the same time.

He who does not take the assassin job, will get killed by one who does.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Oct 2003 15:00
if keystate(scancode value)=1 then...

-RUST-

Login to post a reply

Server time is: 2024-11-25 14:31:23
Your offset time is: 2024-11-25 14:31:23