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

Trouble with weapons

Recommended Posts

Im having some trouble with this weapon

actor Shogun : Weapon 2001
{
  Weapon.SelectionOrder 350
  Inventory.PickupSound "weapons/pickup"
  Weapon.AmmoGive 12
  Weapon.AmmoUse 4
  Weapon.SlotNumber 3
  Weapon.SlotPriority 0
  AttackSound "weapons/shogun"
  states
  {
  Ready:
     SHOG A 1 A_WeaponReady
     Loop
  Deselect:
     SHOG A 1 A_Lower
     Loop
  Select:
     SHOG A 1 A_Raise
     Loop
  Fire:
     SHOG A 0 A_FireBullets (5.6, 0.5, 7, 7, "BulletPuff")
     SHOG A 0 A_PlaySound ("weapons/shogun")
     SHOG A 7 A_GunFlash
     SHOG BC 5
     SHOG D 4
     SHOG CB 5
     SHOG A 3
     SHOG A 7 A_Refire
     Goto Ready
  Flash:
     SHOF A 4 Bright A_Light1
     SHOF B 3 Bright A_Light2
     Goto Lightdone
  Spawn:
     SHOP A -1
     Loop
  }
}  
Its supposed to shoot 4 shells and 7 pellets and its called Shogun. Its my first weapon wad.

Share this post


Link to post
UnawarePresence said:

Oh... sorry, but well anyway it wont show up in my inventory, but I can pick it up.


I have the SAME PROBLEM. If you find out what the problem is with the invo thing, please hit me up!

Share this post


Link to post

Your weapon does not have a defined ammo type. It gives twelve, it uses four, but twelve what, four what?

Share this post


Link to post

Hi guys, I got it fixed. I thought the inheritance would take care of the ammo type. Heres the new code:

actor Shogun : Weapon 2001
{
  Weapon.SelectionOrder 350
  Inventory.PickupSound "weapons/pickup"
  Weapon.AmmoGive 12
  Weapon.AmmoUse 4
  Weapon.AmmoType "Shell"
  Weapon.SlotNumber 3
  Weapon.SlotPriority 1
  Inventory.PickupMessage "You got the Shogun!"
  AttackSound "weapons/shogun"
  states
  {
  Ready:
     SHOG A 1 A_WeaponReady
     Loop
  Deselect:
     SHOG A 1 A_Lower
     Loop
  Select:
     SHOG A 1 A_Raise
     Loop
  Fire:
     SHOG A 0 A_FireBullets (5.6, 0.5, 8, 8, "BulletPuff")
     SHOG A 0 A_PlaySound ("weapons/shogun")
     SHOG A 7 A_GunFlash
     SHOG BC 5
     SHOG D 4
     SHOG CB 5
     SHOG A 3
     SHOG A 7 A_Refire
     Goto Ready
  Flash:
     SHOF A 4 Bright A_Light1
     SHOF B 3 Bright A_Light2
     Goto Lightdone
  Spawn:
     SHOP A -1
     Loop
  }
}  

Share this post


Link to post
UnawarePresence said:

Hi guys, I got it fixed. I thought the inheritance would take care of the ammo type.

It would, if you had inherited from a class which has a ammo type defined. Like "Shotgun" for example. But you derived directly from the base class for all weapons...

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
×