I am trying to create a sword that has a couple of functions, and I am using a couple of existing codes as a base, namely Gravity Cat's Cutlass from his Flintlock Weapons pack, and the Reflector Pixel from a certain Pixel Spells pack.
My goals are to create a Melee weapon capable of not only being able to block and parry other weapons, but also not be able to defend its user in a gun fight.
#Don'tBringAGunToASwordFightNo. This will not be a lightsaber, since Trogtor is already working on that.
But I see a number of issues that may develop, even before completely finishing the code. Since there may be an unbalancing issue, I will place an energy function to this.
Namely, the parry function is what is bothering me the most. Unlike the block function, which protects the user from harm so as long as the user is holding the specific button, parrying is only supposed to last as long as the sword swing resolves. How would I manage to avoid a situation like that in which the code breaks, and the blocking is continuous?
Code is
here, just for reference.