Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-14-2001, 10:35 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
A Keydown command for most every key on the keyboard would be useful... I dont know how hard itd be to do though.
Reply With Quote
  #2  
Old 03-15-2001, 01:13 AM
galen galen is offline
Professional God
Join Date: Mar 2001
Location: Colorado, USA
Posts: 925
galen is on a distinguished road
using the key's ASCII number will do it

032 = space
010/013 = carage return (LF/CR)
008 = BkSp
0;51 = F1
0;233 = é
etc...
Attached Files
File Type: txt ascii.txt (2.4 KB, 322 views)
__________________
Galen S. Kant
galen "at" terraweb.net
Reply With Quote
  #3  
Old 03-15-2001, 06:17 AM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
Thank you very much Galen!
Reply With Quote
  #4  
Old 03-15-2001, 06:21 AM
ReBBisH ReBBisH is offline
Atashi Obiru Daija
ReBBisH's Avatar
Join Date: Mar 2001
Location: USA
Posts: 1,107
ReBBisH is on a distinguished road
Send a message via ICQ to ReBBisH
El Very Useful *downloads* Why the code though?


Reply With Quote
  #5  
Old 03-15-2001, 10:21 AM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
What is the ASCII number used with? I have tried keydown and #K, but I dont know why they aren't working... can you jst do a quick little example of the command to recognize it? thanks.
Reply With Quote
  #6  
Old 03-15-2001, 10:23 AM
freddyfox freddyfox is offline
Banned
freddyfox's Avatar
Join Date: Mar 2001
Posts: 6,705
freddyfox is on a distinguished road
NPC Code:

if(keydown(032)){
ooga booga;
}

Reply With Quote
  #7  
Old 03-15-2001, 07:06 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by freddyfox
NPC Code:

if (created||timeout) {
if(keydown(032)){
ooga booga;
}
timeout = 0.05;
}

Blah, just fixed up Vermain's script for him.
__________________

Reply With Quote
  #8  
Old 03-15-2001, 10:53 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
I have tried those, they do not work, I have tried the following ways:
NPC Code:

if (playerenters || timeout) {
timeout = 0.05;
}
if (timeout && keydown(032)){
setplayerprop #c,test;
timeout = 0.05;
}
if (timeout && strequals(#K,032)){
setplayerprop #c,test;
timeout = 0.05;
}



Do these work for other people? I have tried other ASCII numbers for other keys, but for some reason it doesnt work at all...
I think somehow I have to use #K(key) with the brackets since message #K(050); works fine and siplays the number 2.
Reply With Quote
  #9  
Old 03-15-2001, 10:57 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by Thak2

Do these work for other people? I have tried other ASCII numbers for other keys, but for some reason it doesnt work at all...
I think somehow I have to use #K(key) with the brackets since message #K(050); works fine and siplays the number 2.
Blah, try using this code:
NPC Code:
if (created||timeout) {
if (keydown(#K(050))) {
message test!;
}
timeout = 0.05;
}

__________________

Reply With Quote
  #10  
Old 03-15-2001, 11:02 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
No, that doesnt work, I have tried numerous ways, the either end up with errors, or dont work at all.
Reply With Quote
  #11  
Old 03-15-2001, 11:04 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Blah.

I'll try some things myself now until I find one which works.
__________________

Reply With Quote
  #12  
Old 03-15-2001, 11:08 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Hmm...

it probably doesn't work because it takes away the 0 in the actual script in the level itself (I checked that with the debugger), I'll try finidng a way around it. Hmm nope that can't be it either... Graal sees 050 and 50 as the same... Blah, I can't think of anything, except that you could use it to make a password hard to read like:

if (strequals(#c,#K(050)#K(132)) etc.
__________________


Last edited by grim_squeaker_x; 03-15-2001 at 11:16 PM..
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.