AlyxDaFennec Posted February 22, 2022 (edited) I've made a custom weapon and it works great but im having issues with not being able to swap to it. I went over it over and over again and im just not sure what I'm missing. ACTOR BountyHunter: DoomPlayer { Player.WeaponSlot 1, Fist, Chainsaw Player.WeaponSlot 2, Pistol Player.WeaponSlot 3, Blaster, SuperShotgun } ACTOR Blaster: Weapon Replaces shotgun 28210 { Weapon.SelectionOrder 350 Weapon.AmmoUse 1 Weapon.AmmoGive 30 Weapon.AmmoType "Clip" Weapon.Slotnumber 3 Inventory.PickupSound "weapon/getgun" Inventory.PickupMessage "You've Found Your Trusy Blaster!Hooray!!" States { Spawn: BLAS A -1 STOP SELECT: BLAR A 1 A_Raise Loop Deselect: BLAR A 1 A_Lower Loop Ready: BLAR A 10 A_WeaponReady Loop Fire: BLAF ABC 0 Goto BlasterFire BlasterFire: BLAF A 0 A_PlaySound ("weapon/firegun", 0.7) BLAF A 0 A_Recoil(0) BLAF A 3 A_FireCustomMissile("Bolt",0,4,7,-8) BLAF A 3 A_GunFlash BLAF B 3 BLAF C 0 A_Refire("BlasterFire") Goto Ready Flash: BLAG A 3 Bright Stop } } ACTOR Bolt : Actor 30540 { +RANDOMIZE Decal "Scorch" Projectile Radius .0010 Height 4 Speed 60 Damage 2 Deathsound "Weapons/Plasma" States { Spawn: BLAM ABCD 2 Bright Loop Death: BLAM EFG 1 Bright Stop } } this is what I got Edited February 22, 2022 by AlyxDaFennec 0 Quote Share this post Link to post
xdarkmasterx Posted February 22, 2022 (edited) It doesn't work because your new gun replaces the original shotgun and takes on it's identifier. You either need to substitute "blaster" for the weapon it replaced in your new class: 4 hours ago, AlyxDaFennec said: ACTOR BountyHunter: DoomPlayer { Player.WeaponSlot 1, Fist, Chainsaw Player.WeaponSlot 2, Pistol Player.WeaponSlot 3, shotgun, SuperShotgun Or inherit blaster from DoomWeapon instead of replacing anything: 4 hours ago, AlyxDaFennec said: ACTOR Blaster: DoomWeapon 28210 { Edited February 22, 2022 by xdarkmasterx 0 Quote Share this post Link to post
Gez Posted February 22, 2022 I believe the problem is that you're using Blaster as your class name, and it's already in use. So your player class is set up to use the Heretic blaster weapon, rather than your custom weapon. Rename it to something else, like MyBlaster or whatever. @xdarkmasterx: no, the "replaces" keyword only affects thing spawning in the map. It has no impact on weapon slots. Also inheriting from DoomWeapon instead of Weapon wouldn't change much. 0 Quote Share this post Link to post
xdarkmasterx Posted February 22, 2022 5 hours ago, Gez said: I believe the problem is that you're using Blaster as your class name, and it's already in use. So your player class is set up to use the Heretic blaster weapon, rather than your custom weapon. Rename it to something else, like MyBlaster or whatever. @xdarkmasterx: no, the "replaces" keyword only affects thing spawning in the map. It has no impact on weapon slots. Also inheriting from DoomWeapon instead of Weapon wouldn't change much. On gzdoom 4.5.0 changing the weapon defined in the slot does work https://www.dropbox.com/s/mvxcepwu004qq2t/blast.wad?dl=0 it seems like inheriting it from DoomWeapon will also work but doesn't allow you to spawn the weapon in using commands, I didn't account for there being a class already defined though :p 0 Quote Share this post Link to post
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.