I posted this in the zdoom forums, but not having much luck there.
Anyway, I added a custom weapon to replace the SSG, but for whatever reason, after I pick it up and use it for a bit (sometimes it takes a few mins) the game locks up entirely and I have to force quit. I can't figure this issue out at all. Here's the code, and I'll also link a file for download if anyone wants to test it out themselves.
Question
Alexagon
I posted this in the zdoom forums, but not having much luck there.
Anyway, I added a custom weapon to replace the SSG, but for whatever reason, after I pick it up and use it for a bit (sometimes it takes a few mins) the game locks up entirely and I have to force quit. I can't figure this issue out at all. Here's the code, and I'll also link a file for download if anyone wants to test it out themselves.
https://drive.google.com/file/d/10Ykaoksv1-aio4jCAPZcwOYx5kpmCjPo/view?usp=sharing
Actor FusionPistol : ModWeapon replaces SuperShotgun { Weapon.SelectionOrder 3000 Weapon.SlotNumber 3 Weapon.AmmoType "FusionMag" Weapon.AmmoUse 1 Weapon.AmmoGive 0 Weapon.AmmoType2 "clip2" Weapon.AmmoGive2 10 Weapon.AmmoUse2 0 +WEAPON.AMMO_OPTIONAL +WEAPON.NOAUTOFIRE Inventory.PickupMessage "You got a Fusion Pistol!" obituary "%o was melted by %k's Fusion Pistol" states { Ready: TNT1 A 0 A_jumpifinventory ("givefire", 1, "FireReady") PLPG A 1 A_WeaponReady (WRF_ALLOWRELOAD) loop FireReady: PLPR A 1 A_WeaponReady (WRF_ALLOWRELOAD) loop Select: TNT1 A 0 A_PlaySound("weapons/prifle/equp") PLPG A 1 A_Raise PLPG A 1 Offset(67, 100) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(54, 81) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(32, 69) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(22, 58) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(10, 47) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(7, 39) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(2, 34) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) GOTO READY Deselect: TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("AnimToggle")==1, "DeadSelect") TNT1 A 0 A_PlaySound("weapons/deselect") TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(2, 34) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(7, 39) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(10, 47) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(22, 58) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(32, 69) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(54, 81) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(67, 100) PLZR A 1 A_Lower TNT1 A 0 A_TaKeInventory ("givefire", 999) Wait Fire: TNT1 A 0 A_JumpIfNoAmmo ("dryfire") TNT1 A 0 A_jumpifinventory ("givefire", 1, "FireFire") TNT1 A 0 A_playsound ("weapons/bfg/fire") PLPG B 3 BRIGHT PLPG C 3 BRIGHT A_FireCustomMissile("FusionBulletPoison") PLPG A 8 goto Ready NoReloadFire: TNT1 A 0 A_JumpIfInventory("Clip2", 1, 1) goto fire+1 TNT1 A 0 A_TakeInventory("Cell", 1, TIF_NOTAKEINFINITE) TNT1 A 0 A_jumpifinventory ("givefire", 1, "FireFire") PLPG A 0 TNT1 A 0 A_playsound ("weapons/bfg/fire") PLPG B 3 BRIGHT PLPG C 3 BRIGHT A_FireCustomMissile("FusionBulletPoison") PLPG A 8 goto Ready AltFire: TNT1 A 0 A_playsound ("weapons/bfg/pickup", 1, 0.6) TNT1 A 0 A_jumpifinventory ("givefire", 1, "disablealt") TNT1 A 0 A_GiveInventory ("givefire") PLPG A 1 Offset(0, 35) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 2 Offset(0, 34) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(0, 33) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 2 Offset(0, 33) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) goto fireready DisableAlt: TNT1 A 0 A_playsound ("weapons/bfg/pickup", 1, 0.6) TNT1 A 0 A_TaKeInventory ("givefire", 999) PLPR A 1 Offset(0, 35) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(0, 34) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 1 Offset(0, 33) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(0, 33) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) goto ready Firefire: TNT1 A 0 A_JumpIfNoAmmo ("Dryfire") PLPR A 0 TNT1 A 0 A_playsound ("weapons/bfg/fire") PLPR B 3 BRIGHT PLPR C 3 BRIGHT A_FireCustomMissile("FusionBulletFire") PLPR A 8 PLPR A 10 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) goto Ready Dryfire: TNT1 A 0 A_PlaySound("weapons/pistol/dryf", 6) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(0, 35) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 2 Offset(0, 34) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(0, 33) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 2 Offset(0, 33) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) Reload: TNT1 A 0 A_JumpIfInventory("FusionMag", 10, 2) TNT1 A 0 A_JumpIfInventory("Clip2", 1, "ReloadWork") PLPG A 1 A_WeaponReady Goto Ready ReloadWork: TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(4, 38) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(8, 46) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(10, 54) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(12, 62) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 2 Offset(13, 70) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 10 Offset(14, 78) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) ReloadLoop: TNT1 A 0 A_TakeInventory("Clip2", 1) TNT1 A 0 A_GiveInventory("FusionMag", 1) TNT1 A 0 A_JumpIfInventory("FusionMag", 3, "ReloadFinish") TNT1 A 0 A_JumpIfInventory("Clip2", 1, "ReloadLoop") Goto ReloadFinish ReloadFinish: TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 10 Offset(14, 78) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 1 Offset(13, 70) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) TNT1 A 0 A_PlaySound("weapons/prifle/beep") TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(12, 62) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 1 Offset(10, 54) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPG A 1 Offset(8, 46) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) PLPR A 1 Offset(4, 38) TNT1 A 0 A_WeaponReady(WRF_NoFire|WRF_NoSwitch) Goto Ready Spawn: PLSP A -1 Stop } } ACTOR FusionBulletPoison : FastProjectile { Radius 2 Height 2 Speed 80 Damage 3 PoisonDamage 5, 80, 25 Projectile +RANDOMIZE +BLOODSPLATTER Obituary "%o was shot to pieces" Decal "bulletchip" States { Spawn: BLT1 A 1 Bright Loop Death: BLT1 A 1 Bright A_spawnitem("bulletpuff") Stop XDeath: BLT1 A 0 Stop } } ACTOR FusionBulletFire : FastProjectile { Radius 2 Height 2 Speed 80 Damage 3 Projectile +RANDOMIZE Obituary "%o was shot to pieces" Decal "bulletchip" States { Spawn: BLT1 A 1 Bright Loop Death: BLT1 A 1 A_PlaySound("Afrit/Hellfire") BLT1 A 1 Bright A_spawnitem("Hellfire1") Stop xDeath: BLT1 A 1 A_PlaySound("Afrit/Hellfire") BLT1 A 1 Bright A_spawnitem("Hellfire1") stop } } Actor GiveFire : Inventory { Inventory.maxamount 1 } ACTOR FusionMag : Ammo { Inventory.PickupMessage "" Inventory.Amount 0 Inventory.MaxAmount 3 Ammo.BackpackAmount 0 Ammo.BackpackMaxAmount 3 Inventory.PickupSound "" }
Share this post
Link to post
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.