|
Post by Avi on Oct 22, 2013 13:32:46 GMT -5
[On every gun's ready loop] A_Jumpifinventory("Knife", 1, "KnifeAttack") [The knife attack state on every gun] KnifeAttack [D frames] <Fire the invisible projectiles to give the knife better range than A_Melee> [D frames] A_JumpIfInventory("Knife", 1, "QuickKnifeSwapThingName") QuickKnifeSwapThingName Puke [ACS script that will give player "QuickKnifeSwap" inventory and instantly select the knife as the weapon the player wants] DO NOT REMOVE THE "Knife" TOKEN YET, that comes in the actual Knife code. --- Knife's weapon code Ready: A_JumpIfInventory("QuickKnifeSwap", 1, "ReadyLoop") <- Because we will manually select the knife sometimes too
ReadyLoop: 0 A_JumpIfInventory("Knife", 1, "KnifeAttack") <Usual Readyloop stuff here>
<Attack code already exists>
<AltFire will only be the D-frame set stab attack, since it's the longest reaching (and probably the strongest) single attack for the knife>
KnifeAttack:
[E frames] 1 A_Melee(blahblah) [E frames] <animation> [E Frames] <Close to wrapping up the animation somewhere> A_JumpIfInventory("Knife", 1, "KnifeAttack") <-- Since we don't have a proper "refire" for this kinda thing, I figured having the state loopable will make rapid attacks easier and maybe even quicker/more effective.
Yep, that's gonna be one hell of a fun knife. Stabby Stabby.
|
|