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 mulitple BP Store and efficiency.

HI All

I am making a simple idle killer mobile game which has about 20ishs store to buy and sell items.

I have started buy making each store a separate BP with all the coding for each sale and production in individual BPs & one main BP to control cost and production times.

After making the fourth BP, I realised how much redundant scripting there must be.

Is there are way with maybe Child BP or one main BP to do all the calculations and sales through castings or alike.

The game follows the following primes:.

Store 1 buys Product A and from that produces Product B, Store 2 buys Product B and from that produces Product C. Store 3 Buys Product A & B and from that produces product D etc etc, you get the drift.

It is done in 3rd person with thumbsticks for movement and touch to activate widgets to control the sales such as purchases / Sales.

I have thought about putting the stores in an array and pulling the data, but I am not sure if this would be the best method as there are many different stats that vary in each store, such as sales price fluctuating with sales trends.

Also the game will allow the player to buy NPCs to work as runners, ie, deliver Product A to Shop 3.

I am not looking for the final solution, just some guidance to the most efficient way to do this.

Redgards Narg

Product Version: UE 4.21
more ▼

asked Jan 14 '19 at 08:06 AM in Blueprint Scripting

avatar image

1.7k 74 38 110

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

1 answer: sort voted first

Have you looked into using a Blueprint Function Library or a Blueprint Macro Library? These will allow you to create custom blueprint function nodes that are accessible throughout your project.

As another option (which you hinted at), you could create a high-level "Store" blueprint that contains some core functions that you want to be able to re-use. Then you could derive your individual stores blueprints from that high-level, master blueprint (e.g. right-click your "Store" blueprint to create a child "Store1" blueprint, "Store2", "Store3", etc.).

In a similar vein, you could create a generic, master "Product" blueprint that contains any of the shared variables or functions that all products have. Then, derive individual product blueprints from that master one (e.g. right-click your "Product" blueprint to create child "ProductA", "ProductB", "ProductC", and "ProductD" blueprints).

Using this approach, if you make your core blueprint functions accept the generic "Store" or "Product" blueprint types, any subclass (child blueprint) of those types will be acceptable parameters without needing to do any casts. (This is because you don't need to cast 'up', only down.)

Hopefully that makes sense and helps you organize your project in a way you like.

more ▼

answered Jan 14 '19 at 04:56 PM

avatar image

1.2k 4 5 8

(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