Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-25-2010, 09:01 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Keydown / Enablefeatures?

I've disabled the use of a few things using enable features (Map, Pause, Q, R, S+A, S+D, Display of hearts over head, and the use of nicknames). Now I can't use the D key in:
PHP Code:
if ( keydown) ) { 


I've tried enable weapons, etc. Nothing worked... onWeaponFired() didn't work either (while weapons were enabled of course )

So what's happening? I can use
PHP Code:
if ( keydown2getkeycode"d" ), false ) ) { 
but I want to know why I can't access the D key via keydown();

EDIT ::
Other keys work.. The M key doesn't seem to work either, but that's understandable because I disabled it. Does S+D disable the D key itself?
Reply With Quote
  #2  
Old 07-25-2010, 09:06 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
D (weapon) is 4.. 5 = Sword, 6 = Grab
__________________
Quote:
Reply With Quote
  #3  
Old 07-25-2010, 09:07 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Damn wiki told me 7
Reply With Quote
  #4  
Old 07-25-2010, 09:19 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You must of misread the table because it clearly says 6 (and has been since April 26th at least).
__________________
Quote:
Reply With Quote
  #5  
Old 07-25-2010, 09:21 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Err, 6. Whatever

Either way, it's still wrong...
Reply With Quote
  #6  
Old 07-25-2010, 09:28 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
player.selectedweapon is the index of the selected weapon in the players weapon aray.

PHP Code:
if (player.selectedweapon == player.weapons.index(findweapon("Name"))) 
Reply With Quote
  #7  
Old 07-25-2010, 09:30 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by devilsknite1 View Post
Err, 6. Whatever

Either way, it's still wrong...
and now it's fixed.
__________________
Quote:
Reply With Quote
  #8  
Old 07-25-2010, 09:34 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
Quote:
Originally Posted by oo_jazz_oo View Post
player.selectedweapon is the index of the selected weapon in the players weapon aray.

PHP Code:
if (player.selectedweapon == player.weapons.index(findweapon("Name"))) 
Shouldn't it be

PHP Code:
if ( player.selectedweapon == player.weapons.indexblah ] ) { 
?
Reply With Quote
  #9  
Old 07-25-2010, 09:38 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by oo_jazz_oo View Post
player.selectedweapon is the index of the selected weapon in the players weapon aray.

PHP Code:
if (player.selectedweapon == player.weapons.index(findweapon("Name"))) 
Should be:

PHP Code:
if (player.weapon == this) { // weapon is currently selected 
For selecting a weapon:
PHP Code:
player.selectedWeapon player.weapons[player.weapons.index(findWeapon("Weapon"))].id// select a weapon by name 
Not sure if there is a better way to do the second, but yours probably won't work since player.weapons is an array of weapon objects.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:52 PM.


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