Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-09-2001, 12:41 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
the keydown events

Could someone be kind enough to post a list of the keydown's.. like thos
0 = a
or whatever each keydown numeric form corrisponds with in letters
Reply With Quote
  #2  
Old 06-09-2001, 12:48 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
I mainly need the keydown's for the following buttons
Z, X, C, and V
Reply With Quote
  #3  
Old 06-09-2001, 12:52 AM
WhoopA WhoopA is offline
Registered User
Join Date: May 2001
Location: Wherever I may roam
Posts: 86
WhoopA is on a distinguished road
There are no keydowns for those buttons. These are the only ones available:

0- Up
1- Left
2- Down
3- Right
4- D
5- S
6- A
7- M
8- Tab
9- Q
10- P
__________________
WhoopA, the Official Kicker of Butts

--- No images. No clutter. Just pure, simple text.
"Thank you, thank you. Please, ladies, put your clothes back on... Not you Samus..." - Link from the BOTVGH
Everywhere I look, I see rabbits. Maybe I should take down all my Sailor Moon stuff.
Reply With Quote
  #4  
Old 06-09-2001, 12:58 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
Ugh, that sucks.. well thanks anyway =)
Reply With Quote
  #5  
Old 06-09-2001, 01:41 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
Ok so tell me then, why don't this work?

if (playery=>6&&keydown(5)) {
playerdir=up;
playery=playery-0.5;
}
Reply With Quote
  #6  
Old 06-09-2001, 02:19 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool well

it should be

playerdir=0;
__________________
Thanks,
-KJL
Reply With Quote
  #7  
Old 06-09-2001, 02:22 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
Ok i tried...
if (playery=>6&&keydown(5)) {
playerdir=0;
playery=playery-0.5;
}
but it still don't work.. what it's suppose to be doing is move the player up by 0.5 notches every time they press S
Reply With Quote
  #8  
Old 06-09-2001, 02:59 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
need a Timeout in there

NPC Code:

if (playerenters ||timeout ) {
timeout = 0.05;
}
if (timeout&&playery=>6&&keydown(5)) {
playerdir=0;
playery=playery-0.5;
timeout=0.05;
}


note: you can substitute playerenters with anyother thing you want...
Reply With Quote
  #9  
Old 06-09-2001, 03:17 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
Ok thanks, i got it working, but one thing still isn't right.. the player can just hold down the button and move up, i want them to have to repeatedly press the button so the faster the press it the faster they move, and the slower the press it the slower they move. i'd post what i have, but i don't want anyone to steal it =)
Reply With Quote
  #10  
Old 06-09-2001, 03:27 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool to check if they have the keyup

ok to check if they have the key up do something like this
NPC Code:
if(keydown(<numb>) && this.keydown==0){
this.keydown=1;
//do rest of the coding
}
if(!keydown(<numb>) && this.keydown==1)
this.keydown=0;

__________________
Thanks,
-KJL
Reply With Quote
  #11  
Old 06-09-2001, 03:43 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
Ok i added that and it still didn't work, you can just hold down the button and move =(
Reply With Quote
  #12  
Old 06-09-2001, 04:03 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool humm I dunno

I dunno...

oh..

do you
disabledefmovement?

so they cant hold up...

so they have to press the button...
__________________
Thanks,
-KJL
Reply With Quote
  #13  
Old 06-09-2001, 04:04 AM
Geovanie Legend Geovanie Legend is offline
Graunch Programmer
Geovanie Legend's Avatar
Join Date: May 2001
Location: Missouri
Posts: 931
Geovanie Legend is an unknown quantity at this point
Send a message via ICQ to Geovanie Legend Send a message via AIM to Geovanie Legend Send a message via MSN to Geovanie Legend Send a message via Yahoo to Geovanie Legend
yep i done that, lol
Reply With Quote
  #14  
Old 06-09-2001, 04:12 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool I would...

I dunno I would have to see your script
__________________
Thanks,
-KJL
Reply With Quote
  #15  
Old 06-09-2001, 05:03 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
if(keydown(5)){
if(this.keydown==0){
this.keydown=1;
...
}
}else this.keydown=0;
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233

Last edited by Tyhm; 06-09-2001 at 05:07 AM..
Reply With Quote
  #16  
Old 06-09-2001, 05:06 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Cool that shouldn't

that shouldn't matter if it says
elseif
or
if
__________________
Thanks,
-KJL
Reply With Quote
  #17  
Old 06-10-2001, 08:19 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
if you want it to be the more you press the faster it goes..
like if you keep pressing it really fast then I suggest you do some sort of speed string .. which adds +.5 or whatever every time the player has the key down and has a max value .. like 3 or whatever.. and also it would have to take out .5 when there is no key down
shouldnt be hard to make. I'd do it but I'm too lazy, too busy and sun burn hurts
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #18  
Old 06-10-2001, 10:08 AM
T-Squad T-Squad is offline
Banned
T-Squad's Avatar
Join Date: Mar 2001
Location: United States of America
Posts: 1,733
T-Squad is on a distinguished road
actually it does matter with else...
basicly without else, it will do everything instantly....

for istance try doing weapon fired, and making it go something like:
if (weaponfired) {
if (this.on = 1) {
this.on = 0;
}else{
if (this.on = 0) {
this.on = 1;
}
}
}

then have another going:

if (weaponfired) {
if (this.on = 1) {
this.on = 0;
}
if (this.on = 0) {
this.on = 1;
}
}

and you will see what i mean ;-)
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 10:10 PM.


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