![]() |
disable sword
If anybody has experience with this I wouldn't mind a little help finding an answer.
I want to basically disable the s key. I've tried a few things, I searched on the board and found a few things that didn't work. A way to disable the sword so I can make a new one for the s key. I've tried setting the swordpower to 0, but it won't let me? I've tried replaceani but it still cuts and stuff and freezes you a little. It would be nice if there was a enablefeatures option to get rid of the sword or something like that though. |
i know i got it to work a while ago by just setting the gani to idle whenever the player pressed S so they never used the sword.if u wanna make a system then just set S to whatever you need.
|
Re: disable sword
Copy the sword.gani to a new gani named swordsafe.gani.
A weapon script should have (clientsided): if (created) { replaceani sword,swordsafe; } Press S. |
Re: Re: disable sword
Quote:
I guess I could live with that, if it's the best I can get. |
Re: Re: Re: disable sword
Quote:
|
As Tseng said,replaceani would be a good idea,then if you want,script a new "HP System",trigger an action to hurt the players and etc.
Im not sure about bushes/tiles,but i think hitobjects would work. :grin: |
Re: Re: Re: Re: disable sword
Quote:
|
How about...
NPC Code:disableweapons; That might be what yer looking fer. |
Quote:
NPC Code:disableweapons; would be if he wanted to disable everything including npc's,and sword. He justs wants the space bar,number 5,and s to be clear so he can put a new action there. Adam doesnt want a sword.;) |
He could use disableweapons, but then he'd have to rescript the state, and the NPCW firing. :P
|
Quote:
|
Quote:
|
Quote:
|
well thanx for the suggestions.
|
some new flags should be added for "enablefeatures" for disabling they keys A,S and maybe D.
|
// NPC made by Chicken NaNa
if (timeout || playerenters){ timeout = 0.05; if (keydown2(keycode(S),true) || keydown(5)) { setsword nosword.png,0; replaceani sword,idle; setplayerprop #c,Hmm; } } There's some un-nessecary stuff in there I was just testing some ****e :) but it works :). |
Quote:
|
Quote:
|
You COULD just disable weapons, readd the A button features (not hard), and assign D to a different function, like instead of using toweapons in weapons, you could run a flag that is added when you press D, then remove it
|
Quote:
Anyway, as I was saying; toweapons adds a weapon to the weapon list from a level. What does that have to do with assigning D to a different function? |
Classic sorta depends on toweapons, bad idea to take it away right now.
|
I said there was alot of un-nessecary code in there becasue I was testing.
he didn't ask for it to work online nor did he say offline aswell so yeh, aint sure about that one though. |
Quote:
|
Quote:
But I would prefer a serveroption (disabletoweapons=true), since that works the best for the most people (each server can determine if they want it allowed or not). |
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 09:33 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.