Unreal Inventory System Course - #3 Adding and Removing Items

  Рет қаралды 1,415

The Game Dev Cave

The Game Dev Cave

Күн бұрын

Many of our games will require some sort of inventory system! And let me tell you, there are too many ways to count to make something like that but today, lets take a look at how you can get started on building your own inventory system!
This episode's project files:
/ 100717512
• Post
Full course :
/ inventory-series-10031...
• Inventory FULL COURSE ...
Bonus Episode:
/ intenvory-bonus-100356841
• Inventory Course : Bon...
Finished Course Project files :
/ inventory-course-99591435
/ @thegamedevcave
Join the discord for any help you need! : / discord
Join this channel to get access to perks:
/ @thegamedevcave
support the channel and development over on patreon : / thegamingcaves
Get personalized Coaching : www.fiverr.com...

Пікірлер: 20
@BanXxX69
@BanXxX69 2 ай бұрын
05:20 how did you add this node to make the white line go around?
@thegamedevcave
@thegamedevcave 2 ай бұрын
it's a rerouting node. you can add one by just pulling off any other node and searching for reroute, I believe the shortcut for adding one on an existing line is ctrl+click but it's such muscle memory for me that i am not 100% on that XD
@BanXxX69
@BanXxX69 2 ай бұрын
@@thegamedevcave Thanks! The reroute node worked for me (didn't understand it right in the video =)) and I somehow managed to pulled one off by ctrl+clicking but it only worked once so I need to butterfinger it a bit more :D Thanks alot! :D
@BanXxX69
@BanXxX69 2 ай бұрын
12:43 It works for me up to this point but when I click "add XY" nothing happens. (I started with a blank project, the component is added to an actor class which will be the 2D-Main-Char, the "Items" are not Rocks but Chars and have no Mesh but instead a 2D-Papersprite and will work like Stickers in a Sticker Album). It works when I select them manually on one of the 16 slots. So I guess something with the targeting (self) is wrong? Can you help? 🙂
@thegamedevcave
@thegamedevcave 2 ай бұрын
whatever is in the item here isn't really relevant for this function. either the add rock function or the add item function itself must have a mistake in it
@BanXxX69
@BanXxX69 2 ай бұрын
@@thegamedevcave Allright thanks I'll go through it again step-by-step 🙂
@BanXxX69
@BanXxX69 2 ай бұрын
@@thegamedevcave And the fact that the component is attached to a simple pawn shouldn't matter either, right?
@thegamedevcave
@thegamedevcave 2 ай бұрын
@@BanXxX69 yeah the component works on any actor, later in the course we even put it in a basic normal actor to make a chest :)
@BanXxX69
@BanXxX69 2 ай бұрын
@@thegamedevcave YESSSS FOUND THE MISTAKE!!! I didn't connect the initial Execution line xDD 🙈 Now it works and I'm fascinated, I've been adding and removing Items now for like 15 mins straight xDDD PS: And great, looking forward to the chest! I will try to make use of it as a random drop and then evolve it into a random drop that the player gets passively every so often.
@kellowattentertainment
@kellowattentertainment 6 ай бұрын
When adding the item to the inventory, why didn't you just get the total quantity of the items instead of adding the items one by one?
@thegamedevcave
@thegamedevcave 6 ай бұрын
it makes some of the math later easier when merging together stacks and buying items from shops. It's not exactly optimal but it's also a very simple operation to doing it a number of times (unless you're stacking millions of items) won't actually matter and those systems become a lot less painful to program as a result. ideally, what you probably want is a simple "Add X: function as well as the "add 1" function that we have now though.
@MyBroWithValorant
@MyBroWithValorant 6 ай бұрын
Great tutorial. I opted for a data table system because of item instantiation. When you edit a data asset, that changes the value for every data asset, meaning something like an ammo value for a weapon will not work with dynamically instances items. Will there be a solution to this issue in future videos?
@thegamedevcave
@thegamedevcave 6 ай бұрын
with this system you don't edit the data assets themselves. The data assets are used as read only object in this system, things like the amount of ammo you have is stores in the inventory slot instead. The same way I imagine you have to do with data tables, since those as a whole are read only assets too (you can't dynamically write to them). if you get a lot more complex with your items (giving them meta data like enchantments and stuff) you can add an extra object to the inventory slot struct that can hold arbitrary data. But this series doesn't get in that deep.
@MyBroWithValorant
@MyBroWithValorant 6 ай бұрын
@@thegamedevcave Yeah, I ended up creating an item struct with a string map for unique attributes and using it in a data table as a read only template.
@thegamedevcave
@thegamedevcave 6 ай бұрын
@@MyBroWithValorant that's a pretty good workaround! do be mindful that reading (specifically comparing) strings is a pretty costly operation to do though. I doubt it's the kind of thing you'll have to do every frame/ multiple times a frame. if you set it all up in a clever way you'll probably only have to read from it every once in a while so it won't be a problem :) still, good to be mindful!
@RevolverShot
@RevolverShot 4 ай бұрын
jo chief got a question. well its all working fine and i really like your tutorial series. the problem is, the item i chose is not showing up but i did the add item and also checked the add function 100 times. u have a clue what it could be?
@thegamedevcave
@thegamedevcave 4 ай бұрын
strange issue, i'm not sure what's happening there but it sounds like your add item function might be running inside of a for loop or something maybe?
@RevolverShot
@RevolverShot 4 ай бұрын
@@thegamedevcave i dunno :O
Unreal Inventory System Course - #4 Item Drops
17:27
The Game Dev Cave
Рет қаралды 1 М.
Unreal Inventory System Course - #1 Items
12:23
The Game Dev Cave
Рет қаралды 3,2 М.
АЗАРТНИК 4 |СЕЗОН 3 Серия
30:50
Inter Production
Рет қаралды 1 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 65 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 25 МЛН
Unreal Engine Optimization: Hard and Soft References
6:00
Unreal Dystopia
Рет қаралды 4,8 М.
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 186 М.
Unreal Engine Features EVERYONE Should Know
25:20
The Game Dev Cave
Рет қаралды 1,6 М.
Unreal Engine 4 Tutorial - Building Series Part 4: Inventory UI
12:40
Blueprint VS. C++ When and How to Use Them
12:18
The Game Dev Cave
Рет қаралды 788
Crafting - Intermediate Inventory Follow-up #4
25:06
The Game Dev Cave
Рет қаралды 253