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

Weapon doesn't spawn in-game and I can't find the error.

Question

I've been at this for an hour straight. This is my 2nd DECORATE script, the first one being a simple thing that replaced some sounds. This one, I can't see anything wrong. It's probably messed up all over the place though.

 

actor MP40 : DoomWeapon
{
   Weapon.SelectionOrder 650
   Weapon.AmmoUse 1
   Weapon.AmmoGive 20
   Weapon.SlotNumber 3
   AttackSound "mp40/shot" 
   Weapon.AmmoType "Clip"
   Inventory.PickupMessage "$GOTCHAINGUN" // "You got the chaingun"
   Obituary "$OB_MPCHAINGUN" // "%o was mowed down by %k's chaingun."
   Tag "$TAG_CHAINGUN"
   States
   {
   Ready:
     MPFV A 1 A_WeaponReady
     Loop
   Deselect:
     MPFV A 1 A_Lower
     Loop
   Select:
     MPFV A 1 A_Raise
     Loop
   Fire:
     MPFV A 0 A_PlaySound("mp40/shot", CHAN_WEAPON)
     MPFV A 3 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
     MPFV B 0 A_ReFire
     Goto Ready
   Spawn:
     MPFL A -1
     Stop
   }
}

 

If anyone can help me, it'd be greatly appreciated.

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

okay I'd advise checking the console for errors, but if it's compiling fine and everything I'm going to assume you typoed your sprites somewhere since the game won't spawn something that lacks sprites and it won't let you select it either.

Share this post


Link to post
  • 0

To make it appear in the game, you need to make it replace a weapon (replaces SuperShotgun on first line), or give it a DoomEd number and then place it in a map, or make a custom monster (or custom version of a standard monster), and make that monster drop the weapon when killed.  Meanwhile, to test the weapon, type summon MP40 in the console to make it appear in front of you, or give MP40 to put it into your inventory.

Share this post


Link to post
  • 0

It's saying the MP40 "has no frames" but it does. Not sure what went wrong.

Share this post


Link to post
  • 0

if it has "no frames" that means that the sprite defined for the spawn state does not exist. Double check that there are no typos and that the sprite actually is in your WAD or PK3.

Share this post


Link to post
  • 0

If you are making a wad, the sprites need to be between the SS_START and SS_END markers.  If you are making a pk3, the sprites need to be in the Sprites folder.

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
×