A_DropItem Not Working on First Try

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

A_DropItem Not Working on First Try

Postby Inferon » Wed Jan 05, 2022 3:53 pm


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
TNT1 A 0 A_DropItem(CellA)

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.
Joined: 05 Jan 2022
Operating System: Windows Vista/7/2008 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Return to Assets (and other stuff)

Who is online

Users browsing this forum: No registered users and 0 guests