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 03-23-2003, 07:04 AM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Question Multi Keys

Ok this is getting no where. I have tired everything to get multi keys to work fr simple &&'s to setting var's when a key is held down to deleting it when the key is released.. Anyone wanna clue me in to this?
Reply With Quote
  #2  
Old 03-23-2003, 08:01 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Like if you are holding the V key and N key at the same time or something.

Kai, you said he might be a better scripter than me? (laughs) Anyways, you can simply run a for loop and have an array (length 26 for just the regular alphabet). Then if it's pressed, then make it 1, if not, 0. Then just do your testing.
__________________
[signature]insert here[/signature]
Reply With Quote
  #3  
Old 03-23-2003, 06:16 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Quote:
Originally posted by screen_name
Like if you are holding the V key and N key at the same time or something.

Kai, you said he might be a better scripter than me? (laughs) Anyways, you can simply run a for loop and have an array (length 26 for just the regular alphabet). Then if it's pressed, then make it 1, if not, 0. Then just do your testing.
Yea def still don't work >.<
Reply With Quote
  #4  
Old 03-23-2003, 07:00 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
I don't know what you mean with 'multi keys',is that like press ctrl+d?so...

NPC Code:

timeout=0.05;
if(keydown2(17,true)){
if(keydown2(keycode(d),true)){
say2 You pressed:ctrl+d;
}
}

__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #5  
Old 03-23-2003, 07:48 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
NPC Code:

timeout = .05;
if (timeout) {
this.key = -1;
if (keydown2(17,true))
this.key += 2;
if( keydown2(keycode(d),true))
this.key += 2;
if (this.key % 3 == 0)
say2 You pressed "ctl+d" good for you!;
timeout = .05;
}

__________________
new account: Trevor
Reply With Quote
  #6  
Old 03-23-2003, 07:52 PM
Ethic_Sern Ethic_Sern is offline
Banned
Join Date: Aug 2002
Location: NewYork,NY
Posts: 97
Ethic_Sern is on a distinguished road
Send a message via AIM to Ethic_Sern
Quote:
Originally posted by osrs
I don't know what you mean with 'multi keys',is that like press ctrl+d?so...

NPC Code:

timeout=0.05;
if(keydown2(17,true)){
if(keydown2(keycode(d),true)){
say2 You pressed:ctrl+d;
}
}

thats what i was doing wrong for if(keydown2(17,true)){ i was useing keycodes
Reply With Quote
  #7  
Old 03-24-2003, 05:20 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
The way I stated was not to find a specific combination of keys. I thought hemeant just getting any keys pressed. Oh nevermind.
__________________
[signature]insert here[/signature]
Reply With Quote
  #8  
Old 03-25-2003, 02:30 AM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
Quote:
Originally posted by screen_name
The way I stated was not to find a specific combination of keys. I thought hemeant just getting any keys pressed. Oh nevermind.
hooked on fonicks?
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #9  
Old 03-25-2003, 06:30 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by HoudiniMan


hooked on fonicks?
=/ Spelling class?

Anyways, it was 4am, what more could you expect?
__________________
[signature]insert here[/signature]
Reply With Quote
  #10  
Old 03-25-2003, 09:04 AM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan will become famous soon enough
Quote:
Originally posted by screen_name


=/ Spelling class?

Anyways, it was 4am, what more could you expect?
*shrugs* it was a joke
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

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:38 AM.


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