Hello,
In the mod that I am working on, I am making larger capacity ammo pickups drop lower capacity versions upon pick-up. For example, below is what I have modified for the "cell kit" by Dreadopp that I found on Realm 667:
ACTOR CellKit : CellA
{
Inventory.PickupMessage "Picked up an energy cell kit."
Inventory.Amount 40
States
{
Spawn:
CELK A -1
Stop
HoldAndDestroy:
TNT1 A 0 A_DropItem(CellA)
Stop
}
}
The weird thing is that it only seems to not drop a "CellA" the first time a "CellKit" is picked up. Any time after the first "CellKit" is picked up during a play-through, they correctly drop the "CellA". This behavior continues across levels, in that if I pick up a "CellKit" on level 1, the next "CellKit" on level 2 will correctly drop "CellA" as intended. I have also tried A_SpawnItemEx but I get the same results.
This only seems to happen for ammo pick-ups. I have the same thing set up for health pick-ups, but it functions as intended with those.
Any help would be greatly appreciated.