x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.13
Tags:
more ▼

asked Sep 18 '16 at 11:02 AM in Blueprint Scripting

avatar image

Eightshot
143 7 15 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

more ▼

answered Sep 18 '16 at 04:34 PM

avatar image

Shadowriver
35.8k 926 169 1104

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question