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"

Trouble getting image from array of actors with texture variables.

Okay So I built an inventory system. I want the tooltip pictures I added to my item class to show up as an image representing the item's location in my inventory. I can pick up the items and add them into my inventory, and I can see the item in my inventory when I eject from my pawn, so I know its getting into the inventory. When I respawn the actor from my inventory it retains the same tooltip pic as well.

Here's what my inventory looks like (very simple for now, white squares are the blank images): alt text

Now here are the two blueprints I've tried (since the max inventory slots are 25, i'm going to dupe the function and just change the index its looking for, for each inventory slot): alt text

alt text

alt text

Here is the variable setup attached to my Item class: alt text

When I use the BP I attached where I use "make slate brush", if I select an asset form the image drop down instead of using my items picture variable, a picture will show up, so I feel that means its going through my loop correctly after casting, no?

Product Version: UE 4.16
inventory.png (353.9 kB)
bp1.png (147.1 kB)
bp2.png (155.5 kB)
bp1.png (147.1 kB)
tooltipvar.png (47.4 kB)
more ▼

asked Oct 07 '18 at 10:51 PM in Blueprint Scripting

avatar image

8 1 4

avatar image ThompsonN13 Oct 08 '18 at 12:24 AM

your loop makes no sense. actually i looked again and your loop is entirely unnecessary. once you cast, get the inventory, then just use a get node for the index that you want. this will eliminate the loop and the branch which will make it better performant and less likely to have bugs.

avatar image The_Palumbo Oct 08 '18 at 01:56 AM

You're totally right. I re wrote it, but the tool tip picture still won't get to the image widget. alt text

bp3.png (132.1 kB)
(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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