Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Rhebiz

Custom weapons not working

Question

Ive made/added them to my wads before, and have had no issue with them. However today my weapon:

Actor ZSuperShotgun 15001
{
  Weapon.SelectionOrder 400
  Weapon.AmmoUse 2
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell"
  Inventory.PickupMessage "You got the Super Shotgun!"
  Obituary "%o was splattered by %k's Super Shotgun!"
  Decal BulletChip
  States
  {
  Spawn:
    KSSG L -1
    Stop
  Ready:
    KSSG A 1 A_WeaponReady
    Loop
  Deselect:
    KSSG A 1 A_Lower
    Loop
  Select:
    KSSG A 1 A_Raise
    Loop
  Fire:
    KSSG A 3
    KSSG A 0 A_GunFlash
    KSSG A 0 A_PlayWeaponSound("Weapons/KDiZDSSGFire")
    KSSG A 7 A_FireBullets(12, 6, 20, 5, "BulletPuff")
    KSSG B 5 A_CheckReload
    KSSG C 5
    KSSG D 5 A_PlaySound("Weapons/KDiZDSSGOpen")
    KSSG E 5
    KSSG K 6
    KSSG F 5
    KSSG G 5 A_PlaySound("Weapons/KDiZDSSGLoad")
    KSSG H 5
    KSSG C 5 A_PlaySound("Weapons/KDiZDSSGClose")
    KSSG B 5
    KSSG A 5
    Goto Ready
  Flash:
    KSSG I 4 Bright A_Light1
    KSSG J 3 Bright A_Light2
    Goto LightDone
  }
}

 Yet I get this error:

fuckingterribleerror.PNG.b71d59b5c4e02a60302561044209f41c.PNG

 

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 2
Posted (edited)

It could be because it's not inheriting from Weapon at the minimum, and thus doesn't understand weapon properties in this context.

 

Quote

Note: In order to make a weapon, the actor always has to inherit from Weapon or another actor that does inherit from Weapon, such as SuperShotgun.

 

See the wiki:

https://zdoom.org/wiki/Creating_new_weapons#Defining_an_actor

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×