Spawn Item Loot after Enemy is Killed

Can someone advise or point me in the right direction to create a blueprint that spawns a money bag to loot after being dropped by an enemy ai that was killed by the player to pick up?

I have my character, a bag game asset, a gun that shoots, a simple inventory, and a simple attacking ai that can be killed and I am trying to figure this out.

Thank you in advance.

If enemy can be killed, it have some “kill” event. you can call SpawnActorFromClass from that event in enemy location.

Basically you must have some base pickups class. It should be like collision component + mesh component.

When it overlapped by player character/pawn, you should call some “add coins” function in player class and simply destroy that pickup

Can you post a pic of this information like a Blueprint setup?
Sorry just wondering how you do it :slight_smile:
Thank in advanced for the help.

Here is an all-in one custom node you can call when an enemy is killed that will do this all for you including specifying the “rarity” of the dropped object. All you need to do is hook up the output pin to a “Spawn Actor From Class” node and you are good to go.

Ex setup: