Day 12 - Consumable Item Removal System in C++ (Unreal Engine 5)

Hello everyone,

I’ve just completed Day 12 of my Unreal Engine 5 Gameplay Engineer journey.

Today I improved my consumable item system by implementing inventory item removal after usage.

Features implemented:

:white_check_mark: RemoveItem Function

:white_check_mark: Consumable Item Logic

:white_check_mark: Inventory Updates

:white_check_mark: Health Restoration

:white_check_mark: Equipment Integration

:white_check_mark: Automatic Re-Equip Logic

Current gameplay flow:

Collect Item

↓

Add To Inventory

↓

Equip Item

↓

Use Item

↓

Restore Health

↓

Remove Item

Example output:

Equipped: Coin

Added Item: Coin

Inventory Size: 1

Using: Coin

Health: 25

Removed Item: Coin

Inventory Size: 0

Healing 25 HP

Current project systems:

:video_game: Day 1 - First C++ Actor

:video_game: Day 2 - Character Movement

:video_game: Day 3 - Health System

:video_game: Day 4 - Sprint System

:video_game: Day 5 - Double Jump

:video_game: Day 6 - Interaction System

:video_game: Day 7 - Collectible Items System

:video_game: Day 8 - Inventory System

:video_game: Day 9 - Equipment System

:video_game: Day 10 - Item Usage System

:video_game: Day 11 - Consumable Items System

:video_game: Day 12 - Consumable Item Removal System

One issue I discovered during testing was that the character became unequipped after consuming an item even when more items were still available in the inventory. I fixed this by automatically equipping the next available item whenever the inventory is not empty.

This project is part of my journey to become a Gameplay Engineer by building gameplay systems from scratch in Unreal Engine 5 using C++.

Video:Day 12:https://youtu.be/Sd1Jw0DJS58

[PASTE YOUR YOUTUBE LINK HERE]

Any feedback, suggestions, or code review comments are welcome.

Thank you!