Adding Consumable Loot

Today in Unreal Engine we looked at creating useful loot which drops after a target is killed.

To do this we created a new blueprint actor which we called loot and assigned any static mesh as a placeholder, we then added a collision box which allows it to interact with the player. From here we accessed its blueprints to tell it to add 30 to the players max ammo when it is walked over and then to destroy itself.

To make it drop from the target we opened the targets blueprints and created the string of code that when its destroyed it will drop the loot in the air in a random direction.

Leave a comment