Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Zulk RS

Help needed for making a new type of Ammo.

Recommended Posts

I was trying to make a new ammo type for a custom weapon but when I use it in my wad, it shows a missing sprite sign and doesn't do anything when I try to pick it up.
I don't know what I'm doing wrong. Please help.

Spoiler



Share this post


Link to post

The weapon works but there's one problem now. It doesn't use any ammo. How do I fix this? Please help.

Here's the whole code:

Spoiler

Actor DtexRifle : PlasmaRifle 20047
{
  Weapon.AmmoUse 1
  Weapon.AmmoType "ECrystal"
  Weapon.SlotNumber 6
  Inventory.PickupMessage "Picked up a shitty looking Dretex Energy Rifle."
  States
    {
	Spawn:
		DTEG A -1 
		Stop
	Ready:
		DEGH A 1 A_WeaponReady
		Loop
	Deselect:
		DEGH A 1 A_Lower
		Loop
	Select:
		DEGH A 1 A_Raise
		Loop
	Fire:
		DEGH A 3 A_FireCustomMissile ("NewPlas",0,0,0,0)
		DEGH B 15 A_ReFire
		Goto Ready
	Flash:
		DTEF A 4 Bright A_Light1
		Goto LightDone 
		DTEF B 4 Bright A_Light1
		Goto LightDone
	}
}
Actor ECrystal : Ammo 20045
{
  Radius 16
  Height 8
  Inventory.PickupMessage "Got a Dretex Energy Clip"
  Inventory.Icon "DREKA0"
  Inventory.Amount 40
  Inventory.MaxAmount 400
  Ammo.BackpackAmount 40
  Ammo.BackpackMaxAmount 800
  States
	{
	Spawn:
		DREK A -1
		Stop
	}
	
}
		
Actor ECrystalBox : ECrystal 20046
{
  Radius 16
  Height 16
  Inventory.PickupMessage "Got a box of Energy Clips."
  Inventory.Amount 100
  Inventory.Icon "EBOXA0"
  States
  {
	Spawn:
		EBOX A -1
		Stop
	}
}

Actor NewPlas : PlasmaBall
{
   Radius 6
   Height 8
   States
   {
  Spawn:
    DTSS AB 6 Bright
    Loop
  Death:
    DTSE ABCDE 4 Bright
    Stop
   }
}

Share this post


Link to post
Zulk-RS said:

A_FireCustomMissile ("NewPlas",0,0,0,0)

If the third parameter of A_FireCustomMissile is set to 0, the weapon will not use ammo when firing. Write just this:

A_FireCustomMissile("NewPlas")

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×