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"

Cannot add struct to array without adding element to internat array

alt text

I ran into this problem with structs and arrays today while working in my procedural world.

I got an array of stucts. Each struct contain their own array. The problem occurred inside blueprints. Adding a struct to the first array seem to require that each of the variables or arrays inside the struct also get populated. Fine, I can create the array... but the only available node is "Make Array" and it wants to add an element... (Description : Create an array from a series of items). But I don't want to add any elements yet, or rather, I can't because they don't exist yet.

Funny thing is, I accidentally solved this just now... you can right click on the "in pin" item in the "Make Array" node and choose "remove array element pin". This way, an array can be created without any elements :D But this wasn't very intuitive for me as a new blueprint user (and experienced programmer).

A small change suggestion for the Make Array node :

  • Remove the default item that it tries to add to the array.

  • This would leave left side of the node empty like seen on the image, add a "Add pin +" on the left side as well (can be named differently to make its function more obvious).

Product Version: UE 4.11
more ▼

asked Apr 03 '16 at 04:50 PM in Blueprint Scripting

avatar image

Deon Cadme
21 1 3 4

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

1 answer: sort voted first

Yep, thats current behaviour of structs in bp. You can reserve something like -1 for blank spot member and check it before use to separate actually "empty" array from not empty.

more ▼

answered Apr 03 '16 at 05:47 PM

avatar image

1.2k 57 21 57

(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