
Custom Items in UEFN
Unverified — this example may not compile as-is.
The Verse code below did not pass our automated compile check, so it isn't marked verified and is hidden from the guide listing. The explanation may still be useful, but treat the code as a draft and adapt it before use.
What you'll learn
In this guide, you'll learn how to:
- Set up your UEFN project for custom items and inventory
- Create custom items using Verse code
- Use custom items in your game
How it works
Custom items in UEFN use the fort_item_pickup_interactable_component to allow players to pick up and use items. The fort_inventory_component manages the items in the player's inventory.
Let's build it
using { /Fortnite.com/Devices }
using { /Fortnite.com/Itemization }
using { /UnrealEngine.com/Itemization }
using { /Verse.org/Simulation }
my_custom_item_device := class<concrete>(creative_device):
OnBegin<override>()<suspends>: void =
# Create a custom item
MyItem := item_component{}
MyItem.ItemType = 'MyCustomItem'
MyItem.ItemName = 'My Custom Item'
# Add the item to the player's inventory
PlayerInventory := fort_inventory_component{}
PlayerInventory.AddItem(MyItem)
# Create an interactable component for the item
Interactable := fort_item_pickup_interactable_component{}
Interactable.ItemComponent = MyItem
Try it yourself
Try creating your own custom item and adding it to your game. Experiment with different item types and properties to see how they affect gameplay.
Recap
In this guide, you learned how to create and use custom items in UEFN. With this knowledge, you can create unique and engaging gameplay experiences for your players.
Check your understanding
Test yourself with an interactive quiz and track your progress + earn XP — free for members.
Turn this into a guided course
Add Using Custom HELD Items in UEFN to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
Original guide generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.