![]() |
Weapon select
Is there a command to select weapon (index) but not run any scripts in it, only select it for you weapon usage?
|
Re: Weapon select
Quote:
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. |
selectedweapon [index];
Say you wanted to automatically set the player's weapon to weapon Bow. NPC Code: |
Quote:
|
showimg 200,#w(selectedweapon),x,y;
Have a nice day |
Quote:
|
Quote:
|
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. |
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)
|
[screen_name says:]
i almost forgot about the hidden weapons when i was scripting my inventory :P i figured it out though |
| All times are GMT +2. The time now is 09:28 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.