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"

How can I set up a simple Skin Texture Shop?

So I created a widget to function as a Store for players to spend in-game points on stuff.

I am trying to find and figure out a way that I can allow them to spend points on New Character Skins which is basically just swapping out a Material/Texture after they unlock and enable it.

Can someone advise or point me in the right direction for how to do this? I have been looking around on google and youtube but I can't seem to find anything on this..

Any ideas?

Product Version: UE 4.18
more ▼

asked Oct 02 '18 at 11:42 PM in Blueprint Scripting

avatar image

113 13 21 21

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Create a struct with all your item details, in the struct you could have variables like price, name, material etc Create a second struct containing the struct you just made - make this an array type.

Create a widget to display the item, inside it make a variable with your 1st struct( the one with the name price etc) Set the variable to instance editable and expose on spawn.

When you want to display the items, reference the 2nd struct (the one with the arrays) and do a for loop with. On every loop create the item widget, you will see the variable you made when you select the widget to create, In the for loop you will see the structs within the array, plug that into the exposed variable you will see when you create the widget.

In the widgets "onConstruct" event, set the price and name from the struct variable inside it.

To see if the player has the item, you can add the second struct you created(the array one) to a savegame file and just add the item every time the player buys it, when the widget is created just do a find node on the widget struct and check to see if the player save struct contains the widget struct,

I use SQL for this stuff as the save game is easily hacked.

There is no wrong way, just use your imagination :)

more ▼

answered Oct 02 '18 at 11:55 PM

avatar image

98 2 5 8

avatar image Deygus Oct 03 '18 at 12:00 AM

Thank you so much for the help with this!

avatar image timsev7n Oct 03 '18 at 12:02 AM

No prob, if you need more help I'm happy to help.

avatar image Deygus Oct 03 '18 at 12:04 AM

Alright, thank you! I am gonna try it on my own first to give it a good attempt. :)

avatar image timsev7n Oct 03 '18 at 12:06 AM

You sir, deserve a cookie :)

(comments are locked)
10|2000 characters needed characters left
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