![]() |
Disabling Swords
I am wondering if anyone has stumbled upon this or have noticed this. This code disables the sword
code: setsword 0,#1; I hope you can all understand what that statement says. |
Does that not just set it as a level 0 sword? He he, I just set ap to 100 for my HP System, never really occured to me otherwise...
Good thinking :D ---Shifter |
no slicing either
well it does set to zero, but I also noticed that when I press s.. I do not slice my sword either
|
Ah, he he. I didn't realize doing that would. Thanks, of course you should set a var (preferably a string though) to refer back to the sword. If you set a var and they get dc'ed or restart it clears =/
---Shifter |
duh
duh, I know.. I am not a newbie scripter ;)
Just haven't posted that much :D |
yes, sage chaozu is a very good scripter :)
|
I used to use this method, but slightly modified.
NPC Code: But now I use disabledefmovement. |
LOL, I know you aren't Sage, I"ve heard a few people tell me that Sage could own me in scripting =/ Gets old fast, considering I've never seen him and they've never seen my stuff :(
---Shifter |
Quote:
|
Best way is probably to rescript the whole movement etc.
|
Quote:
|
Quote:
|
Quote:
|
Quote:
I did something like this with the bombs for Atlantis actually it's no problem to replace this... |
Quote:
|
so what u want is swords disabled but not the NPCs Weapons Or anything in that order may i ask why and why dont u use
PHP Code:
|
Quote:
PHP Code:
|
With that script you could simply select another weapon.
Use timeouts and set selectedweapon to this weapon always. I did so in the Nimda sparring. But we are off-topic now. We wanted to disable the sword, and just the sword. By doing "setsword no-sword.png,0;" you still have a zero displayed. Using disabledefmovement would hide that, but I couldn't carry NPCs anymore. I know how to carry tile objects like bushes and so, and yes I could even make the player carry a bomb, but I can't make him carry a whole script. |
Disabling NPC Weapons
if (playerenters) {
if (!isweapon) { toweapons NoWeaponSelected; } disableselectweapons; timeout = .05; } if (timeout) { if (!strequals(#w(selectedweapon),NoWeaponSelected)) { for (this.index = 0; this.index <= weaponscount; this.index++){ if (strequals(#w(this.index),NoWeaponSelected)) break; } selectedweapon = this.index; } timeout = .05; } That should be the correct way to disable npc weapons... almost forgot the disable q select |
disableweapons;
|
Quote:
His just stops the sword from working. |
Disableweapons?
Disable Weapons does not let you use your sword...
that script lets you use your sword... also, I had to re-edit because I forgot about disableselectweapons; |
Quote:
after doing shoot the control-npc would get triggered, you set some params with setshootparams and it reads them out after this you can place the right NPC whre you actually throw it |
Why would you really want to disable JUST the sword?? I generally do it the other way, KEEP just the sword, in which case you run it on a timeout, and have it set a this.var of what the selectedweapon is. Such as like:
NPC Code: Is it setting the selected weapon or setplayerprop, god, I dunno, I have one I made that I just repeatedly used. I'm scripted out for a few days, I just made a security system, took AGES to do, it wasn't necessarily hard, just long coded. Angel wanted it scripted, so I did :P I worked on it a total of three days, but it was mostly sitting down and doing one thing, coming back hours l8er or what not ;) It's got a keypad that you can click or type in. ---Shifter |
Quote:
Also one reason why to have the sword disabled is so you can have a server whose primary weapon is not a sword. Like for instance it could be a regular pistol or socom. |
All times are GMT +2. The time now is 05:47 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.