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 to loop through all array elements?

Hi, i tried a lot of settings with get, -1 index, setting array element, or while loop. but somehow the following loop always runs once, beside the array contains more entries. Any idea what is wrong? Thanks!

In this example i create a widget item, and add it to a scroll box panel, this works very well, but missing are the remaining array entries. alt text

Product Version: UE 4.13
problem.jpg (307.2 kB)
more ▼

asked Nov 14 '16 at 03:45 PM in Blueprint Scripting

avatar image

503 33 47 84

avatar image MajekPL Nov 14 '16 at 04:19 PM

set up seems right. if he only print out the text once, then there is only one entry for sure.

avatar image unit23 Nov 14 '16 at 04:37 PM

There are other entries as well, and i can set a different index which gives a different element.

alt text

laddertest.jpg (140.8 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Working now! (Super complicated for someone who is not a programmer, lol)

This is a real time basedGamesparks leaderbaord, which uses a User Widget (LadderListItem), for a scrolling dynamic leader board.

alt text alt text alt text

fix1.jpg (716.5 kB)
fix2.jpg (600.6 kB)
fix3.jpg (581.4 kB)
more ▼

answered Nov 16 '16 at 12:05 AM

avatar image

503 33 47 84

avatar image CrimsonHawk Nov 16 '16 at 01:59 AM

My eyes! It is super confusing for everyone, this so called fix. For arrays, you can and should use ForEach only, always. If that wouldn't be trustworthy, 98% of the projects wouldn't work. If that runs only once, you do have only one element in that array. The question should have been :why does it have only one? And by using breakpoints (F9) you could have found the problem far more easier, than creating this monster of Frankeinstein.

(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