x

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"

Set Members in Struct Does Not Work

alt text

For some reason, I cannot figure out a way to add things to an array inside a struct. I've tried this way and set array elem and neither work. Am I doing something wrong?

Product Version: UE 4.11
Tags:
untitled.png (112.5 kB)
more ▼

asked May 12 '16 at 06:28 PM in Blueprint Scripting

avatar image

Dirtsleeper
41 3 11 13

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

3 answers: sort voted first

You can use "Make Squadcard" and set item into it accordingly.

more ▼

answered May 12 '16 at 09:58 PM

avatar image

ClaudioPiccinni
229 24 20 27

avatar image Dirtsleeper May 12 '16 at 10:03 PM

I don't have everything that goes into the array inside the squad card at this point so I will have to change it later which causes the same issue I'm having now.

avatar image ClaudioPiccinni May 12 '16 at 10:05 PM

I think the problem with your code is that you don't save the modified struct, you are probably just missing a Set for the variable in which you have the struct you are modifying, just after that set members. Take the out pin and set the original variable with it.

avatar image Dirtsleeper May 12 '16 at 10:06 PM

The set members in struct is "supposed" to change values by reference.

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

Well I fixed it like this, even though I find this method to be convoluted and unnecessary, if anyone comes across this in the future.alt text

untitled.png (139.4 kB)
more ▼

answered May 12 '16 at 10:16 PM

avatar image

Dirtsleeper
41 3 11 13

avatar image ClaudioPiccinni May 12 '16 at 10:21 PM

yes it seems exceedingly convoluted, you can probably make it more logical with some more thought

avatar image Dirtsleeper May 12 '16 at 10:22 PM

Trust me, I've tried all the other methods and they do not work.

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

I tried the Set Members in Struct in my own project, with an Integer value, and it works as you intended. The problem might be with a array member. You should make a test isolating only that function and work up from there.

more ▼

answered May 13 '16 at 08:58 AM

avatar image

ClaudioPiccinni
229 24 20 27

avatar image Dirtsleeper May 13 '16 at 12:29 PM

Yes I'm using it in multiple place with a single variable but I have not been able to get it to work with arrays.

avatar image ClaudioPiccinni May 13 '16 at 01:00 PM

Try in the bug reporting section

(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