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"

Getting a range of index from array?

Is there a way to get an array index range for example: 2-15, as in a range of integers, and plug it into Set Array Elem/any other index node?

Product Version: UE 4.8
Tags:
more ▼

asked Sep 19 '15 at 06:00 PM in Blueprint Scripting

avatar image

FZBK
46 3 4 7

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

3 answers: sort voted first

You can try using Resize to initiate bigger number of elements in same time:

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Utilities/Array/Resize/index.html

There no minimal index option, it tied to way native arrays work in C++ (they point to memory address where array start and read farther as you input index), you would need to fix indexes using functions and interact with array exclusively using those functions

more ▼

answered Sep 19 '15 at 06:18 PM

avatar image

Shadowriver
37.2k 936 172 1116

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

Not for sure, if this helps, but if you are looking for the range index to be random, but if so, here's the node

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/Random/RandomInteger/index.html

if you are, use the length or last index node for an array (whether you want the range to relative to 1 or 0) to supply the max value for the RandomInteger node.

Have a great day!

Jay

IceWare

more ▼

answered Sep 20 '15 at 10:53 AM

avatar image

jayice
1.4k 41 28 56

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

If anyone is still wondering, For each loop might do the job.

alt text

screenshot100.png (86.1 kB)
more ▼

answered Jul 06 '17 at 09:26 AM

avatar image

HeXtion
44 2 5 10

(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