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"

Change A variable of an elem of array based on blueprint ?! NEED HELP

A made an array based on a Blueprint and Im trying to use this array as an inventory. The array type is a Base_Item blueprint (this : http://i.imgur.com/Q9sMD2j.png) It contains 2 variable, TextureBase(variable type: texture 2d) and Texture_Selected. I'm made an other variable named Item, (variable type: Base_Item( the same as the array)) and trying to set this as the 0 elem of my array. This is works perfectly so far, BUT when im trying to change the texture for the Array's first item (at index 0) I got error and it doesn't do anything.

Error :


Blueprint code :



Can somebody help me out what im doing wrong or how to change the Elem's variable's value after I added it to my array, because logically I think this should work perfectly and I don't understand whats wrong

Thank you for helping, and sorry for bad English(if I sad anything wrong, I'm not confident with my English)

Product Version: UE 4.8
more ▼

asked Jun 28 '15 at 07:03 AM in Blueprint Scripting

avatar image

Zoltán Vári
25 8 13 19

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

1 answer: sort voted first

your Item variable is Null, meaning the thing it references does not exist, and you cant get or set a property of a reference that does not exist.

you need to spawn a baseItem, or place one in the level, then use that to set your "Item" actor reference.

an array of blueprints (Actor References) needs to be filled with elements that have been spawned into the world, and currently exist, in order to do anything with the array elements.

another way to do this, would be to create a structure that has texture variables, and make an array of those structs instead. that would allow you to have an array of data without having to spawn each element into the world.

more ▼

answered Jun 28 '15 at 07:58 AM

avatar image

9.6k 320 205 450

avatar image Zoltán Vári Jun 28 '15 at 02:05 PM

Thank you so much, whit Struct as an inventory it works perfectly

(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