# Spawn Item Loot after Enemy is Killed

**URL:** <https://forums.unrealengine.com/t/spawn-item-loot-after-enemy-is-killed/394121>\
**Category:** AI\
**Tags:** spawn, unreal-engine, pickups, question, Blueprint, items\
**Created:** [May 20, 2017, 5:15pm UTC](https://forums.unrealengine.com/t/spawn-item-loot-after-enemy-is-killed/394121 "2017-05-20T17:15:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deygus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/deygus/32/982675_2.png) [@Deygus](https://forums.unrealengine.com/u/Deygus)\
**Post date:** [May 20, 2017, 5:15pm UTC](https://forums.unrealengine.com/t/spawn-item-loot-after-enemy-is-killed/394121/1 "2017-05-20T17:15:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![redbox](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@redbox](https://forums.unrealengine.com/u/redbox)\
**Post date:** [May 20, 2017, 6:42pm UTC](https://forums.unrealengine.com/t/spawn-item-loot-after-enemy-is-killed/394121/2 "2017-05-20T18:42:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DarkRisenGamez](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarkRisenGamez](https://forums.unrealengine.com/u/DarkRisenGamez)\
**Post date:** [August 28, 2017, 10:20am UTC](https://forums.unrealengine.com/t/spawn-item-loot-after-enemy-is-killed/394121/3 "2017-08-28T10:20:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Nebula\_Games\_Inc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nebula\_Games\_Inc](https://forums.unrealengine.com/u/Nebula_Games_Inc)\
**Post date:** [March 18, 2019, 7:56pm UTC](https://forums.unrealengine.com/t/spawn-item-loot-after-enemy-is-killed/394121/4 "2019-03-18T19:56:56Z")

</div>

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.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/4/1/b410c3e2a0d5b9de0cc5fcc6e7dd4cb796270d2f.jpeg "Unreal Engine 4 Tutorial: Random Loot Drop #UE4#loot #drop") ](https://www.youtube.com/watch?v=QDGTtCkIreE)

Ex setup:

 ![271693-loot-drop.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/c/0/fc05e8911cc3a437179c6572a73d0d6cb5483fe3.jpeg)
