Modding Shotgun Problem.

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Posts: 1
Joined: Sat Nov 25, 2017 12:47 pm

Modding Shotgun Problem.

Post by DarkTrapt »

So, I am modding the Shotgun in The Ultimate Doom to be fully auto, this is my DECORATE lump via SLumpEd:

Code: Select all

Actor Shotgun : DoomWeapon
  Weapon.SelectionOrder 1300
  Weapon.AmmoUse 1
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell"
  Inventory.PickupMessage "Received Auto Shotgun"
    SHTG A 1 A_WeaponReady
    SHTG A 1 A_Lower
    SHTG A 1 A_Raise
    SHTG A 0 A_PlaySound("weapons/shotgf")
	SHTG A 0 A_GunFlash
    SHTG A 7 A_FireBullets (5, 0, 4, 6.25, "BulletPuff")
	SHTG A 0 A_ReFire
    SHTG BC 5
    SHTG D 4
    SHTG CB 5
    SHTG A 3
    Goto Ready
    SHTF A 4 Bright A_Light1
    SHTF B 3 Bright A_Light2
    Goto LightDone
    SHOT A 1
And this is my KEYCONF Lump via SLumpEd:

Code: Select all

Setslot 3 "AutoShotgun"
I put the WAD into the folder with ZDoom, GZDoom, QZDoom, ect; and the Shotgun hasn't been replaced with the AutoShotgun.
Please help.
User avatar
Moderator Team Lead
Posts: 21623
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: Modding Shotgun Problem.

Post by wildweasel »

When replacing actors, you should generally give your replacement a unique name (ZDoom's console will warn you if you try to make an actor with the same name as an existing one), and use the replaces keyword to direct it to replace an existing actor. So try replacing line 1 with this:

Code: Select all

ACTOR DarkTraptAutoShotgun : DoomWeapon replaces Shotgun

Return to “Scripting”