Missing Frame on Weapon Fire

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Missing Frame on Weapon Fire

Postby ZDL_800 » Thu Feb 18, 2021 8:34 am

Hello Zdoom community and hope everyone is good.

I've tried to figure this out for the past week and basically in the firing animation at the end of the sequence there's a missing frame?

It does loop back to the ready state and works again, but the quick fire command always has this missing frame at the end of the firing sequence?

I have managed to setup the combo and its not missing any inputs when using multiple actions but the missing frame, if you press any attack key on that missing frame nothing will happen.

Code: Select allExpand view
ACTOR SapphireWand : MageWeapon replaces MWeapWand
{
   +BLOODSPLATTER
   +WEAPON.CHEATNOTWEAPON
   +RELATIVETOFLOOR
   Weapon.SelectionOrder 3000
   Weapon.KickBack 200
   +WEAPON.NOAUTOAIM
   Weapon.SlotNumber 1
   Obituary "$OB_MPMWEAPWAND"
   Tag "$TAG_MWEAPWAND"
   Inventory.PickupMessage "$PK_SWAND"
   Speed 5
   States
   {
   Spawn:
      TNT1 A 0 A_JumpIf(CallACS("GetSFXCVar") == 1, 2)
      TNT1 A 0 A_SpawnItemEx("BlueFlare",0,0,40)
      TNT1 A 1 Bright A_SetAngle(angle+speed)
      Loop
   Select:
      TNT1 A 0 A_GiveInventory("ActionTaker",1)
      TNT1 A 0 A_StopSound(6)
      MWND A 1 A_Raise
      Loop
   Deselect:
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo2",1)
      TNT1 A 0 A_GiveInventory("ActionTaker",1)
      MWND A 1 A_Lower
      Loop
   Ready:
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 A_WeaponReady
      TNT1 A 0 A_TakeInventory("SpecialAttackAxe", 1)
      TNT1 A 0 A_TakeInventory("SpecialAttackPunch", 1)
      TNT1 A 0 A_TakeInventory("PunchCombo", 1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_ClearReFire
      MWND A 1 A_WeaponReady
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 A_WeaponReady
      Loop
   ThrowFlechette:
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo2",1)
      MRFL ABCD 2
      TNT1 A 0 ACS_NamedExecuteAlways("Attacked",0)
      TNT1 A 0 A_FireCustomMissile("ThrowedFlechette2", 0, 0, 0, 0)
      TNT1 A 0 A_TakeInventory("QuickFlechetteToss", 1)
      TNT1 A 0 A_TakeInventory("BrutalArtiPoisonBag", 1)
      MRFL EFG 2
      TNT1 A 0 A_GiveInventory("ActionTaker",1)
      Goto Ready
   Fire:
      TNT1 A 0 A_JumpIfInventory("ThirdAttackCombo2",1,"ThirdComboFromSecondary")
      TNT1 A 0 A_JumpIfInventory("DoingAFAtality", 1, "DoingAFAtality")
      TNT1 A 0 A_JumpIfInventory("SpecialAttackPunch", 1, "QuickFire")
      TNT1 A 0 A_JumpIfInventory("SpecialAttackAxe", 1, "SpecialAttack")
      TNT1 A 0 A_GiveInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1
   Hold:
      TNT1 A 0 A_JumpIfInventory("ThirdAttackCombo2",1,"ThirdComboFromPrimary")
      MWND A 1 A_WeaponReady(WRF_NOBOB|WRF_NOPRIMARY)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 ACS_NamedExecuteAlways("Attacked",0)
      TNT1 A 0 A_PlaySound("MWANDFIR")
      TNT1 A 0 A_FireCustomMissile("SapphireTracer",frandom(-28, 28)/((CallACS("AccuracyCalculator")/50)+1),FALSE,0,0,0,frandom(-1,1))
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_Recoil(1)
      MWND B 1 Bright Offset(0,42) A_SetPitch(pitch-0.2)
      MWND B 1 Bright Offset(0,41) A_SetPitch(pitch+0.3)
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(0,38) A_SetPitch(pitch+0.2)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(0,35) A_SetPitch(pitch+0.1)
      MWND A 1 Offset(0,33)
      MWND A 1 A_ReFire
   QuickFire:
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      MWND A 1
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 ACS_NamedExecuteAlways("Attacked",0)
      TNT1 A 0 A_PlaySound("MWANDFIR")
      TNT1 A 0 A_AlertMonsters(1280,AMF_TARGETEMITTER)
      TNT1 A 0 A_FireCustomMissile("SapphireShard",frandom(-12, 12)/((CallACS("AccuracyCalculator")/80)+1),FALSE,0,0,0,frandom(-1,1))
      TNT1 A 0 A_TakeInventory("SpecialAttackPunch", 1)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_Recoil(1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND B 1 Bright Offset(0,42) A_SetPitch(pitch-0.2)
      MWND B 1 Bright Offset(0,41) A_SetPitch(pitch+0.3)
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(0,38) A_SetPitch(pitch+0.2)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(0,35) A_SetPitch(pitch+0.1)
      MWND A 1 Offset(0,33)
      MWND A 1 A_GiveInventory("SpecialAttackAxe", 1)
      MWND A 1 A_WeaponReady
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 7 A_TakeInventory("SpecialAttackAxe", 1)
      TNT1 A 0 A_GiveInventory("ActionTaker",1)
      Goto Ready
   SpecialAttack:
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 ACS_NamedExecuteAlways("Attacked",0)
      TNT1 A 0 A_PlaySound("MWANDFIR")
      MWND A 1
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_TakeInventory("SpecialAttackAxe", 1)
      TNT1 A 0 A_Recoil(-2)
      TNT1 A 0 A_AlertMonsters(1280,AMF_TARGETEMITTER)
      TNT1 A 0 A_FireCustomMissile("SapphireTracer",frandom(-28, 28)/((CallACS("AccuracyCalculator")/50)+1),FALSE,0,0,0,frandom(-1,1))
      TNT1 A 0 A_TakeInventory("SpecialAttackPunch", 1)
      TNT1 A 0 A_SetPitch(pitch-0.5)
      TNT1 A 0 A_Recoil(1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND B 1 Bright Offset(0,42) A_SetPitch(pitch-0.2)
      MWND B 1 Bright Offset(0,41) A_SetPitch(pitch+0.3)
      TNT1 A 0 A_Recoil(-1)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(0,38) A_SetPitch(pitch+0.2)
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(0,35) A_SetPitch(pitch+0.1)
      MWND A 1 Offset(0,33)
      MWND A 1 A_GiveInventory("SpecialAttackAxe", 1)
      MWND A 1 A_WeaponReady
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 7 A_TakeInventory("SpecialAttackAxe", 1)
      MWND A 1
      TNT1 A 0 A_JumpIfInventory("Kicking", 1, "ForceLightning")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 1 A_GiveInventory("PunchCombo", 1)
      TNT1 A 4 A_WeaponReady
      TNT1 A 0 A_TakeInventory("PunchCombo", 1)
      TNT1 A 6
      MWND A 1
      TNT1 A 0 A_GiveInventory("ActionTaker",1)
      Goto Ready
   ForceLightning:
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo2",1)
      MWND A 1 Offset(-8,42)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-18,52)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-30,62)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-42,72)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-54,82)
   ForceLightningLoop:
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 4 Offset(1,32)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      RLNG E 1 A_PlaySound("ZAAP1")
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,-3,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",-8)
      RLNG F 1 A_Custompunch(random(3,30)+CallACS("StrengthCalculator")/8)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,1,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",-3)
      RLNG G 1
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,5,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",2)
      RLNG H 1
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,9,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",6)
      RLNG I 1
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,13,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",5)
      RLNG J 1
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,17,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",4)
      RLNG K 1
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 0 A_RailAttack(3,21,false,"none","none",RGF_NOPIERCING|RGF_SILENT,12,"ForceLightningPuff",8,8,160,0,4,0,"ForceLightningSpark",3)
      RLNG L 1
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      TNT1 A 4
      TNT1 A 0 A_TakeInventory("Kicking",1)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-54,82)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-42,72)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-30,62)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-18,52)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 Offset(-8,42)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      Goto Ready
   AltFire:
      TNT1 A 0 A_JumpIfInventory("ThirdAttackCombo1",1,"ThirdComboFromPrimary")
      TNT1 A 0 A_JumpIfInventory("PunchCombo", 1, "Punch")
      TNT1 A 0 A_JumpIfInventory("SpecialAttackPunch", 1, "Punch")
      TNT1 A 0 A_GiveInventory("ThirdAttackCombo2",1)
      TNT1 AAA 1 BRIGHT A_SpawnItem("ThunderFlare",20,20)
      MWND A 1
   AltHold:
      TNT1 A 0 A_JumpIfInventory("ThirdAttackCombo1",1,"ThirdComboFromSecondary")
      TNT1 A 0 A_WeaponReady(WRF_NOBOB|WRF_NOSECONDARY)
      MWND A 1 BRIGHT A_SpawnItem("PlasmaFlare",30,30)
      TNT1 A 0 A_SpawnItemEx("ShieldDefense2", 20,0,20,0,0,0,0,SXF_NOCHECKPOSITION,0)
      MWND A 1 A_SpawnItemEx("ShieldDefense", 20,0,15,0,0,0,0,SXF_NOCHECKPOSITION,0)
      TNT1 A 0 A_JumpIfInventory("QuickFlechetteToss", 1, "ThrowFlechette")
      MWND A 1 A_Refire
      MWND A 1 A_TakeInventory("ThirdAttackCombo2",1)
      TNT1 A 0 A_GiveInventory("SpecialAttackPunch", 1)
      MWND AABB 1 A_WeaponReady
      TNT1 A 0 A_TakeInventory("SpecialAttackPunch", 1)
      Goto Ready
   DoingAFAtality:
      Goto Ready
   RealPunch:
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo2",1)
      MWND A 1
   ThirdComboFromPrimary:
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo2",1)
      MWND A 1
      MWND AB 1
      Goto ThirdCombo
   ThirdComboFromSecondary:
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo1",1)
      TNT1 A 0 A_TakeInventory("ThirdAttackCombo2",1)
      MWND A 1
      MWND AB 1
   ThirdCombo:
      TNT1 A 5
      MWND A 1
      TNT1 A 0 ACS_NamedExecuteAlways("Attacked",0)
      TNT1 A 0 A_PlaySound("SAMPLE11")
      MWND A 1
      TNT1 A 0 A_TakeInventory("SpecialAttackAxe", 1)
      TNT1 A 0 A_Recoil(-2)
      TNT1 A 0 A_AlertMonsters(1280,AMF_TARGETEMITTER)
      TNT1 A 0 A_JumpIfInventory("Level",16,16)
      TNT1 A 0 A_JumpIfInventory("Level",8,7)
      TNT1 A 0 A_JumpIfInventory("Level",3,2)
      TNT1 A 0 A_Jump(256,2) //LEVEL 3 SHOT
      TNT1 A 0 A_FireCustomMissile("WandPowerSlash1",0,0)
      TNT1 A 0 A_Jump(256,3) //LEVEL 8 SHOT
      TNT1 A 0 A_FireCustomMissile("WandPowerSlash1",-12,0)
      TNT1 A 0 A_FireCustomMissile("WandPowerSlash1",12,0)
      TNT1 A 0 A_Jump(256,4) //LEVEL 16 SHOT
      TNT1 A 0 A_FireCustomMissile("WandPowerSlash1",-18,0)
      TNT1 A 0 A_FireCustomMissile("WandPowerSlash1",0,0)
      TNT1 A 0 A_FireCustomMissile("WandPowerSlash1",18,0)
      TNT1 A 0 A_JumpIfInventory("Level",3,2)
      MWND B 1 A_Custompunch(random(60,90)+CallACS("MagicalCalculator")/6,1,1,"BrutalWandPuffExtreme", 175)
      MWND B 1
      MWND A 1
      TNT1 A 6
      MWND AB 1
      TNT1 A 0 A_GiveInventory("ActionTaker",1)
      Goto Ready
   }
}


If anyone could kindly help us out here I would be eternally grateful, I have tried to edit this many times and broke more than I fixed.

Thankyou for your time and hope to speak soon.
User avatar
ZDL_800
Banned User
 
Joined: 15 May 2019

Re: Missing Frame on Weapon Fire

Postby Arctangent » Thu Feb 18, 2021 4:34 pm

You have a state at the end that lasts 7 tics and uses the TNT1 sprite, which is blank, with no real sign that that wand is supposed to be off-screen or something similar. It's the one that calls A_TakeInventory to remove the SpecialAttackAxe token.
User avatar
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371


Return to Scripting

Who is online

Users browsing this forum: DustedPandemonic and 0 guests