Unreal Engine 5 Inventory System Tutorial

MrKnowBody
23 Jan 202427:51

Summary

TLDRIn today's video, we'll continue from the previous episode on the pickup system to build an inventory system with a UI for weapons. We'll create an inventory blueprint, add icons, and descriptions, and enable drag-and-drop functionality. The inventory can display multiple weapons, with a customizable design and visible weapon descriptions. We'll also show how to drop items by dragging them out of the inventory. The video includes detailed instructions on setting up various widgets, event functions, and blueprint components to achieve a dynamic and functional inventory system in your project.

Takeaways

  • ๐Ÿ˜€ The video is a tutorial on creating an inventory system for a game, continuing from a previous pickup system.
  • ๐Ÿ› ๏ธ The inventory UI will have a simple design with placeholders for icons and descriptions that can be customized.
  • ๐Ÿ” The system allows for picking up, holding, and dropping weapons, with the capability to have up to three weapons if desired.
  • ๐Ÿ“ฆ The tutorial includes creating a new widget blueprint for the inventory and setting up a canvas panel for the UI.
  • ๐Ÿ–ผ๏ธ A 'WB_Underscore_Inventory' blueprint is created, which includes a background blur effect when the inventory is opened.
  • ๐Ÿ“ Descriptions for each weapon will be displayed in the inventory, and can be expanded to show more details.
  • ๐Ÿ”„ The process involves creating a 'WB_Slot' blueprint for individual inventory slots, which will display item icons.
  • ๐Ÿ”„ A new class and actor component called 'VPC_Core_Inventory' is created to handle inventory operations like opening and closing.
  • ๐Ÿ”„ Custom events are used to manage inventory actions, such as updating the inventory when items are picked up or dropped.
  • ๐Ÿ”„ The player's input actions are set up to allow opening and closing the inventory with a specific key, such as the 'Tab' key.
  • ๐Ÿ“ The tutorial covers adding functionality for displaying item descriptions when hovering over items in the inventory.

Q & A

  • What is the main focus of the video?

    -The main focus of the video is to create an inventory system for a game, building on a previously made pickup system.

  • What feature was created in the previous video?

    -In the previous video, a pickup system was created that allows players to pick up weapons.

  • What does the speaker suggest about the icons used in the inventory UI?

    -The speaker suggests that the current icons are just placeholders and encourages viewers to replace them with better-looking icons.

  • How can weapons be dropped from the inventory?

    -Weapons can be dropped from the inventory by dragging them out of the inventory UI.

  • What is the first step in creating the inventory system?

    -The first step is to head back to the items section and add a new variable called item_icon with the texture 2D variable type.

  • What is the purpose of the 'WB_inventory' widget blueprint?

    -The 'WB_inventory' widget blueprint is used to create the inventory UI for the player.

  • How does the speaker suggest blurring the background when the inventory is opened?

    -The speaker suggests adding a background blur to the canvas panel and setting the blur strength to around 3.

  • What variable is added to handle the item icon dynamically?

    -A variable called 'item_details' is added, which will be exposed on spawn to dynamically handle the item icon.

  • How is the 'inventory' variable referenced in the player blueprint?

    -The 'inventory' variable is referenced by adding a BPC inventory component to the player blueprint and creating a new custom event called 'open_inventory' to spawn the inventory widget.

  • What happens when the 'update_inventory' custom event is called?

    -The 'update_inventory' custom event closes the current inventory and reopens it to refresh and update its content.

  • How does the script handle displaying item descriptions?

    -The script adds a new custom event called 'set_description' to the WB_inventory blueprint, which updates the text values for item descriptions when an item is hovered over.

  • What functionality is added to the 'WB_slot' to detect dragging?

    -An override function 'on Mouse button down' is added to the 'WB_slot' to detect when the left mouse button is pressed, allowing the item to be dragged.

  • How does the 'drop slot' widget handle item drops?

    -The 'drop slot' widget uses the 'on drop' function to detect when an item is dropped inside its field, casting to the WB_slot and calling the drop item function to remove the item from the inventory and place it in the game world.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
Game DevelopmentInventory SystemUI DesignDrag and DropBlueprint ScriptingWeapon PickupTutorial VideoPlayer MechanicsCustom WidgetsGame UIProgramming Guide