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"

Help with basic crafting system using blueprints

Hi, how would i go about starting a simple crafting system to make recipes for a cooking game. It doesn't have to be anything more than for example Item 1 + 2 = item 3 and Item 4 + 5 = Item 9, then Item 3 + 9 = Item 12.

Thanks!

Product Version: UE 4.8
Tags:
more ▼

asked Jun 23 '15 at 08:10 PM in Blueprint Scripting

avatar image

pasco295
6 2 3 4

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

1 answer: sort voted first

Well it entirely depends on how complex you want o make it. For instance I have a package of code I want to submit soon that has 4 different "infinitely" expanding weight limited inventory arrays. They can categorize alphabetically and find out exactly what items they contain. That's meant for a completely different game, but what you can do, very very simple in fact, is literally.. addition and subtraction.

Let's say you do all of this in your character BP

  1. Make integer variables for every item in the game and give them a starting value of zero, or whatever you'd like.

  2. Lets say you have one be eggs, one be cups of milk, and one be lbs. of flour

  3. Let's say you need 4 eggs, 2 cups of milk, and 1lb of flour to make a cake

  4. Your cake integer should be set at zero since they don't have any

  5. Whenever your function runs, be it through UMG or through some character specific event, you can grab the integers for eggs milk and flour, and then just compare them using >= statements

  6. If you have sufficient supplies you can then go through and subtract the amount needed from the amount that you have, and then set the amount you currently have with the result

If you want to have all of this done in UMG you can essentially tie all of it to button actions and constantly refresh whenever you produce something. It can also tie into your integer values for the items you have to give you a good visual representation

more ▼

answered Jun 24 '15 at 07:59 PM

avatar image

Jägermanjensen
116 5 5 13

avatar image pasco295 Jun 26 '15 at 10:21 PM

In my head its around 20 items that can be combined in different ways to make 40 or so final items, so 2 layers of combinations i think.

avatar image Jägermanjensen Jun 26 '15 at 11:36 PM

20-40 variables isn't a lot. The array systems I build are for hundreds of items, but having 20-40 variables for items in a character BP isn't bad at all, and it'll save you a lot of time rather than trying to get arrays up and running

avatar image fearlessbeech Apr 28 '17 at 06:37 PM

can you pls make a tutorials on this but in widget blueprint.the exact thing in widget blueprint!!

(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