create an inventory with a variable size in UMG and BPs
Im attempting to create an inventory system in UE 4.13.0 which is akin to those you find in MMOs (but its for a single player RPG) where the player can get bags of varying sizes and place them into one of 5 slots. as these are added the number of slots provided by these bag will be added onto the size of the inventory.
Im afraid this is a 'where to start' question, Ive already watched the tutorials on YT on creating basic inventories and pickup systems but cant see a way to make quantity of bag slots variable and then link it into the UMG. For those who havent found it yet, this tutorial is here: https://www.youtube.com/playlist?list=PLZlv_N0_O1gZo6zXTHGGSH8gxaA7a_zCt
As it stands im looking at making a lot of differant inventories and creating a variable in my main character BP and calling which ever one is equal to the number of slots currently available. However this seems (at best) EXTREMELY inefficient.
would appreciate any advice, and if anyone knows of any tutorials which cover variable slot inventories i would be massively greatful as ive been wrestling with this for 2 days now. Im working in blueprints not C++ as i have no knowledge of programming at all.
Just for referance, im fairly sure people will know the style of inventory i mean but on the off chance they dont, something like this: https://dviw3bl0enbyw.cloudfront.net/uploads/forum_attachment/file/136504/gw229.jpg
Thanks in advance, really appreciate any help that can be offered here.
In addition, I apologise if this is an obvious question, have been learning BPs for just 2-3 weeks now.
asked Sep 18 '16 at 11:02 AM in Blueprint Scripting
By look at it player have bags and bags have items, so you bag should contain items, make a function in bag "IsFull" and check if current number of items in inventory array is the same as size of a bug (you could hold size of bug in some integer varable) if it is, return true and you check that "IsFull" function when do any add opreration, if it's full cancel that operation.... and when you hover over a bag with item so you can show that it can't be added. Remeber to make this function pure so you won't have Exec pins in node
answered Sep 18 '16 at 04:34 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here