Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   keydown (https://forums.graalonline.com/forums/showthread.php?t=13013)

ownerofbabylon 09-26-2001 05:23 PM

keydown
 
I am wanting to make features that add on but i dont like being limited to the 10 keys. Is there anyway to use keys like T or Insert instead of the normal ones?

Knightoffrost 09-26-2001 05:43 PM

[ Delph Inc. ]
Well if you have managed to get the new version as many of us have...you will see that Stefan has included an ascii command.
You know how each key has a certain numeric value? Well that's what this does.
You give it a number and it calls the key related to that number.
I'll type what it says about it:

- new script function ascii(c) to get the
ascii code of a character (ascii(A) is 65);
the other way (converting ascii code to
character) can still be done by using the
#K(num) message code (#K(65) is A)

This means we should be able to do stuff like
if (keydown(ascii(66)) {
script...
}
That would mean if the player has pressed the character 'b'

Thak2 09-26-2001 06:12 PM

You couldn't do that with #k, so I don't think you can do it with the new ascii command.

Mainly because Stefan said he does not want to add anymore keys so he can keep it simple and Zelda like.

LiquidIce00 09-27-2001 03:14 AM

I just do stuff like a+d or a+up and so on when i need more keys .. (sucks you cant do a+s or s+d since they already have functions)

09-27-2001 03:17 AM

Quote:

Originally posted by Knightoffrost
[ Delph Inc. ]
Well if you have managed to get the new version as many of us have...you will see that Stefan has included an ascii command.
You know how each key has a certain numeric value? Well that's what this does.
You give it a number and it calls the key related to that number.
I'll type what it says about it:

- new script function ascii(c) to get the
ascii code of a character (ascii(A) is 65);
the other way (converting ascii code to
character) can still be done by using the
#K(num) message code (#K(65) is A)

This means we should be able to do stuff like
if (keydown(ascii(66)) {
script...
}
That would mean if the player has pressed the character 'b'

that is pretty cool what you typed up but that dont work... if stefan or anybody knows a way where you can do stuff like that, that works pleae post it cause i need to know how to use it to.

09-27-2001 03:55 AM

Quote:

Originally posted by Kaimetsu


It's impossible.

:( stefan add it in 2.1 you big dummy!! :D :D

BocoC 09-27-2001 06:13 AM

I wish Stefan would add support for the DELETE key. I mean, he already has Keydown support for useless keys, like M, P, and Tab... So, why not Delete? I could use a delete darnit! X_X

ownerofbabylon 09-27-2001 07:47 AM

Quote:

Originally posted by LiquidIce00
I just do stuff like a+d or a+up and so on when i need more keys .. (sucks you cant do a+s or s+d since they already have functions)
good point, thanks man :D

nyghtGT 09-27-2001 07:56 AM

i think ...
 
shouldn't he just add where like each number/letter on a standardized keyboard has a number value ... then add where you can choose a keydown command from the list of numbers... ?

Thak2 09-27-2001 08:54 AM

Re: i think ...
 
Quote:

Originally posted by nyghtGT
shouldn't he just add where like each number/letter on a standardized keyboard has a number value ... then add where you can choose a keydown command from the list of numbers... ?
Stefan doesn't want more keys. Because then it would be turned in to a thing where people make NPCs that use 30+ keys, and you have to memorize them and junk. It'd be ridiculus. And Un-Zelda like.

nyghtGT 09-27-2001 09:05 AM

true
 
true true ...

BocoC 09-27-2001 09:13 AM

Maybe if Stefan could add support for the W, E, Z, X, and C keys...... I mean, only 7 keydown keys are of use. The 4 arrow keys, and A, S, and D. Also Q can be of use if you disable the inventory. Then, we have useless keys like Tab, M, and P. Those all have an INTEGRATED function in Graal that cannot be TURNED OFF. Let's subtract the 4 arrow keys. Then, we only have 3 (or 4) keys that can be usefull, because arrow keys control movement. 3 keys is really not enough in my opinion. I think Stefan should at LEAST add support for 3 more keys on the standard part of the keyboard (alphabet). Maybe Z, X, and C? Or W, E, R? I would like Z, X, and C because you can easily access them. These are my thoughts.


All times are GMT +2. The time now is 11:30 AM.

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