I have something similar to this that I got to work. This is a little hacky, but, I created a custom puff for the punch. In the custom puff actor's states, you can have separate states if you only want the effect to happen when you hit an actor, or a wall or such.
Then in the state you want the effect to happen you add this:
Code: Select all
A_RadiusGive("CustomInventory",64,RGF_PLAYERS,1);
This gives an item to the closest player within 64 map units. You can change the range if you need it to be larger.
Then you just have the weapon state check if the player has that inventory item:
Code: Select all
PUNG D 0 A_JumpIfInventory("CustomInventory",1,"Hit");
Make sure you have a frame that removes it from your inventory after, such as at the beginning of the Ready state.