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 01-07-2002, 11:36 AM
kaddar kaddar is offline
Registered User
Join Date: Nov 2001
Posts: 33
kaddar is on a distinguished road
Weapon select

Is there a command to select weapon (index) but not run any scripts in it, only select it for you weapon usage?
Reply With Quote
  #2  
Old 01-07-2002, 12:53 PM
BlKnight BlKnight is offline
Not in Use
Join Date: Mar 2001
Location: N/A
Posts: 1,527
BlKnight is on a distinguished road
Re: Weapon select

Quote:
Originally posted by kaddar
Is there a command to select weapon (index) but not run any scripts in it, only select it for you weapon usage?


What do you mean? You could have a variable set on the selected weapon...or have a thing go like this:

for (this.i=0;this.i<weaponscount-1;this.i++) {
if (strequals(#w(this.i),<WEAPON YOU ARE LOOK FOR HERE>)) {
this.selectedweapon=this.i;
}
}

Then you just use callweapon and for the index in call weapon use this.selectedweapon.
__________________
This account is no longer is use.

Last edited by BlKnight; 01-07-2002 at 01:34 PM..
Reply With Quote
  #3  
Old 01-07-2002, 01:14 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
selectedweapon [index];

Say you wanted to automatically set the player's weapon to weapon Bow.
NPC Code:

for (i=0;i<weaponscount;i++) {
if (strequals(#w(i),Bow)) {
selectedweapon=i;
}
}

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #4  
Old 01-07-2002, 01:33 PM
BlKnight BlKnight is offline
Not in Use
Join Date: Mar 2001
Location: N/A
Posts: 1,527
BlKnight is on a distinguished road
Quote:
Originally posted by BocoC
selectedweapon [index];

Say you wanted to automatically set the player's weapon to weapon Bow.
NPC Code:

for (i=0;i<weaponscount;i++) {
if (strequals(#w(i),Bow)) {
selectedweapon=i;
}
}

Bah...I'm not used to these fancy n00b commands that make things which can already be done easier -_-
__________________
This account is no longer is use.
Reply With Quote
  #5  
Old 01-07-2002, 08:09 PM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
showimg 200,#w(selectedweapon),x,y;

Have a nice day
__________________

subliminal message: 1+1=3
Reply With Quote
  #6  
Old 01-07-2002, 10:04 PM
G_yoshi G_yoshi is offline
Forbidden
G_yoshi's Avatar
Join Date: Mar 2001
Posts: 7,206
G_yoshi will become famous soon enough
Send a message via AIM to G_yoshi
Quote:
Originally posted by Falcor
showimg 200,#w(selectedweapon),x,y;

Have a nice day
He meant is there a command that sets the player's weapon to whatever index you specify.
__________________
Reply With Quote
  #7  
Old 01-07-2002, 10:21 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by G_yoshi


He meant is there a command that sets the player's weapon to whatever index you specify.
sweet sig!
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #8  
Old 01-08-2002, 12:04 AM
kaddar kaddar is offline
Registered User
Join Date: Nov 2001
Posts: 33
kaddar is on a distinguished road
Thanks for all the info.

Blknight, I was considering your idea, but the problem is that it would not work in corralation with keydown(d) if I attempted to rescript the weaponfire as well as weaponselect unless the selected weapon was locked to the weapon-simulation.

And yes, that's what I'm doing, making something like graal2002 weaponselect. I have a menu visible where you can move between all your items, but I can't select the items. =D

IT works now! Yay.
Reply With Quote
  #9  
Old 01-08-2002, 03:41 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Oh, I did that in the backpacknpc, not a problem really, but you have to keep in mind that you might have hidden weapons. (system, and other stuff)
__________________

subliminal message: 1+1=3
Reply With Quote
  #10  
Old 01-08-2002, 04:07 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

i almost forgot about the hidden weapons when i was scripting my inventory :P

i figured it out though
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
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 03:47 AM.


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