# \#randomize-array

**URL:** https://forums.unrealengine.com/tag/randomize-array/4551.md

[Latest](https://forums.unrealengine.com/latest.md) · [Categories](https://forums.unrealengine.com/categories.md) · [Tags](https://forums.unrealengine.com/tags.md)

---

## [It is possible to randomize textures on a static mesh taking random image from an external folder?](https://forums.unrealengine.com/t/it-is-possible-to-randomize-textures-on-a-static-mesh-taking-random-image-from-an-external-folder/473580)

<div class="topic-metadata">

**Author:** [@Pokenic99](https://forums.unrealengine.com/u/Pokenic99)\
**Replies:** 13\
**Last updated:** [September 2, 2026, 7:40am UTC](https://forums.unrealengine.com/t/it-is-possible-to-randomize-textures-on-a-static-mesh-taking-random-image-from-an-external-folder/473580 "2026-09-02T07:40:20Z")

</div>

It is possible to randomize textures on a static mesh taking random image from an external folder? Hi guys, I need help to know if it is possible to make the faces of the cube change randomly with random textures from …

---

## [Random BGM that loops like a playlist](https://forums.unrealengine.com/t/random-bgm-that-loops-like-a-playlist/428982)

<div class="topic-metadata">

**Author:** [@Neil\_London](https://forums.unrealengine.com/u/Neil_London)\
**Replies:** 5\
**Last updated:** [July 25, 2024, 8:23pm UTC](https://forums.unrealengine.com/t/random-bgm-that-loops-like-a-playlist/428982 "2024-07-25T20:23:49Z")

</div>

I’m trying to make a menu that loops random songs and when it is done playing one song, it randomly selects another song and the playlist loops. Think Shuffle + Repeat all. I’ve tried to do this in a sound cue but I don’…

---

## [Why did I use Shuffle, but the position of the array element was not disturbed](https://forums.unrealengine.com/t/why-did-i-use-shuffle-but-the-position-of-the-array-element-was-not-disturbed/445701)

<div class="topic-metadata">

**Author:** [@A1exHuang](https://forums.unrealengine.com/u/A1exHuang)\
**Replies:** 4\
**Last updated:** [October 7, 2023, 5:57pm UTC](https://forums.unrealengine.com/t/why-did-i-use-shuffle-but-the-position-of-the-array-element-was-not-disturbed/445701 "2023-10-07T17:57:28Z")

</div>

If I don’t connect the first array to For each loop, the position of its array elements will be disrupted. Why?

---

## [Random int in range fails](https://forums.unrealengine.com/t/random-int-in-range-fails/1288153)

<div class="topic-metadata">

**Author:** [@Bushwookie69](https://forums.unrealengine.com/u/Bushwookie69)\
**Replies:** 1\
**Last updated:** [September 8, 2023, 5:48pm UTC](https://forums.unrealengine.com/t/random-int-in-range-fails/1288153 "2023-09-08T17:48:23Z")

</div>

When I randomly input the integer in range it usually does not spawn 1-3 tiles. When I manually input the number for it to spawn a tile, it always spawns every tile. Above was with it random and below pics are with…

---

## [Values from struct are not respected when looping over items](https://forums.unrealengine.com/t/values-from-struct-are-not-respected-when-looping-over-items/1250339)

<div class="topic-metadata">

**Author:** [@applepiefrost](https://forums.unrealengine.com/u/applepiefrost)\
**Replies:** 3\
**Last updated:** [August 4, 2023, 9:18am UTC](https://forums.unrealengine.com/t/values-from-struct-are-not-respected-when-looping-over-items/1250339 "2023-08-04T09:18:58Z")

</div>

I’m trying to make a Blueprint that that will automatically generate a bunch of Instanced Static Meshes. I want to be able to pick a static mesh as a base and then have a bunch of Instanced Static Meshes spawn on it. Cor…

---

## [How to randomize widgets opening?](https://forums.unrealengine.com/t/how-to-randomize-widgets-opening/381193)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_d8f00615](https://forums.unrealengine.com/u/anonymous_user_d8f00615)\
**Replies:** 4\
**Last updated:** [July 6, 2022, 9:20pm UTC](https://forums.unrealengine.com/t/how-to-randomize-widgets-opening/381193 "2022-07-06T21:20:54Z")

</div>

Hey so I’m trying to set up a function where what it does is it chooses a random widget from all the widgets I created and displays it on the screen. I already have the widgets created I just don’t know how to do the ran…

---

## [Array index out of bounds condition checking macro](https://forums.unrealengine.com/t/array-index-out-of-bounds-condition-checking-macro/373922)

<div class="topic-metadata">

**Author:** [@SwordsKeyboard](https://forums.unrealengine.com/u/SwordsKeyboard)\
**Replies:** 4\
**Last updated:** [October 27, 2021, 10:38am UTC](https://forums.unrealengine.com/t/array-index-out-of-bounds-condition-checking-macro/373922 "2021-10-27T10:38:03Z")

</div>

I’m getting the below crash after I spawn an actor Assertion failed: (Index \>= 0) & (Index \< ArrayNum) Array index out of bounds: 1 from an array of size 1 Would this macro work as a check against that? I am using a l…

---

## [What is this dot node called?](https://forums.unrealengine.com/t/what-is-this-dot-node-called/453294)

<div class="topic-metadata">

**Author:** [@linkings](https://forums.unrealengine.com/u/linkings)\
**Replies:** 2\
**Last updated:** [September 20, 2021, 12:32am UTC](https://forums.unrealengine.com/t/what-is-this-dot-node-called/453294 "2021-09-20T00:32:01Z")

</div>

Tiny question… but I need this one for random TextRender strings. (From a 2016 screenshot from Sean L)

---

## [Sound cue adding delay](https://forums.unrealengine.com/t/sound-cue-adding-delay/484246)

<div class="topic-metadata">

**Author:** [@Snouter23](https://forums.unrealengine.com/u/Snouter23)\
**Replies:** 4\
**Last updated:** [June 2, 2021, 11:35am UTC](https://forums.unrealengine.com/t/sound-cue-adding-delay/484246 "2021-06-02T11:35:35Z")

</div>

So at the moment, I’m following a book to learn audio design in video games with UE4. In the current section, it’s discussing randomized loops from one-shot sounds with a practice level to show off how this is done. Howe…

---

## [Array: spawn an item, delete the item spawned and if no items left, re-enable the array?](https://forums.unrealengine.com/t/array-spawn-an-item-delete-the-item-spawned-and-if-no-items-left-re-enable-the-array/483194)

<div class="topic-metadata">

**Author:** [@Ululele12](https://forums.unrealengine.com/u/Ululele12)\
**Replies:** 2\
**Last updated:** [May 12, 2021, 5:05pm UTC](https://forums.unrealengine.com/t/array-spawn-an-item-delete-the-item-spawned-and-if-no-items-left-re-enable-the-array/483194 "2021-05-12T17:05:08Z")

</div>

Hey, folks! I have a very specific idea regarding the level streaming in my project. I want to have the following function: an array of levels that I want to make visible at random, and I do not want them to reappear un…

---

## [How do I get the computer to pick a random button widget](https://forums.unrealengine.com/t/how-do-i-get-the-computer-to-pick-a-random-button-widget/482841)

<div class="topic-metadata">

**Author:** [@inkedtoaster](https://forums.unrealengine.com/u/inkedtoaster)\
**Replies:** 4\
**Last updated:** [May 5, 2021, 7:02am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-computer-to-pick-a-random-button-widget/482841 "2021-05-05T07:02:54Z")

</div>

Hey there, I’ve just been trying to program a mechanic in unreal but I’m having some trouble figuring out how to get it to work properly. I’m trying to make a choice system where you have to try and pick the right answer…

---

## [Two Questions Random Images On Buttons](https://forums.unrealengine.com/t/two-questions-random-images-on-buttons/480255)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_86f4b4551](https://forums.unrealengine.com/u/anonymous_user_86f4b4551)\
**Replies:** 13\
**Last updated:** [March 15, 2021, 1:19pm UTC](https://forums.unrealengine.com/t/two-questions-random-images-on-buttons/480255 "2021-03-15T13:19:52Z")

</div>

So i have made a random image system for my buttons and i have 2 questions, 1: Instead of it randomly generating everytime the widget appears i only want it to generate a new picture when the level is loaded. 2: How can …

---

## [Shuffle widget buttons position](https://forums.unrealengine.com/t/shuffle-widget-buttons-position/479788)

<div class="topic-metadata">

**Author:** [@olga\_p](https://forums.unrealengine.com/u/olga_p)\
**Replies:** 2\
**Last updated:** [March 5, 2021, 10:40am UTC](https://forums.unrealengine.com/t/shuffle-widget-buttons-position/479788 "2021-03-05T10:40:09Z")

</div>

So, I have 3 buttons (1, 2, 3), I want them to load in random position every time widget is loading. Example: 3, 1, 2; 2,3,1 and so on. I have no idea if that is correct or not, but I tried to create an array and shuffle…

---

## [Randomly Assigning FVectors To Objectives With Restrictions? C++ OR BPs](https://forums.unrealengine.com/t/randomly-assigning-fvectors-to-objectives-with-restrictions-c-or-bps/479677)

<div class="topic-metadata">

**Author:** [@ZenadarRatoke](https://forums.unrealengine.com/u/ZenadarRatoke)\
**Replies:** 0\
**Last updated:** [March 2, 2021, 8:42pm UTC](https://forums.unrealengine.com/t/randomly-assigning-fvectors-to-objectives-with-restrictions-c-or-bps/479677 "2021-03-02T20:42:59Z")

</div>

I have my C++ class set up to create 20 objectives. 1 ‘bad’ objective and 19 ‘good’ ones. The aim is to use the ‘bad’ one. I need to now assign my 20 objectives to random target points on the map which I have created. I…

---

## [How to create a box trigger that can swap between the same song on 2 different files at the correct time stamp?](https://forums.unrealengine.com/t/how-to-create-a-box-trigger-that-can-swap-between-the-same-song-on-2-different-files-at-the-correct-time-stamp/474919)

<div class="topic-metadata">

**Author:** [@TahoeTheSoldier](https://forums.unrealengine.com/u/TahoeTheSoldier)\
**Replies:** 5\
**Last updated:** [November 28, 2020, 8:36am UTC](https://forums.unrealengine.com/t/how-to-create-a-box-trigger-that-can-swap-between-the-same-song-on-2-different-files-at-the-correct-time-stamp/474919 "2020-11-28T08:36:27Z")

</div>

I have 2 files for 15 different songs that are meant to play one or the other depending on if the player is within a certain area of the game’s map. I want to create a box trigger that, when it detects a player in the tr…

---

## [Set Variable on random player](https://forums.unrealengine.com/t/set-variable-on-random-player/470860)

<div class="topic-metadata">

**Author:** [@ArkaN](https://forums.unrealengine.com/u/ArkaN)\
**Replies:** 3\
**Last updated:** [September 5, 2020, 5:24pm UTC](https://forums.unrealengine.com/t/set-variable-on-random-player/470860 "2020-09-05T17:24:35Z")

</div>

How can i set variable on random player

---

## [How do I create an array of static meshes?](https://forums.unrealengine.com/t/how-do-i-create-an-array-of-static-meshes/466761)

<div class="topic-metadata">

**Author:** [@EdBennett](https://forums.unrealengine.com/u/EdBennett)\
**Replies:** 1\
**Last updated:** [June 15, 2020, 1:07pm UTC](https://forums.unrealengine.com/t/how-do-i-create-an-array-of-static-meshes/466761 "2020-06-15T13:07:11Z")

</div>

I though I would you create a class array of static meshes. However the system does not seem to allow me to populate the defaults. The variable type you’re after is Static Mesh

---

## [Stop Array Duplicating?](https://forums.unrealengine.com/t/stop-array-duplicating/463853)

<div class="topic-metadata">

**Author:** [@revilo14](https://forums.unrealengine.com/u/revilo14)\
**Replies:** 7\
**Last updated:** [April 17, 2020, 6:53pm UTC](https://forums.unrealengine.com/t/stop-array-duplicating/463853 "2020-04-17T18:53:43Z")

</div>

Hello, sorry if this posts twice, not sure if previous worked or not :// I currently have 3 objects being randomly spawned into my game at different positions. These positions are decided by 5 target points around my ma…

---

## [Make Array pick a value more than 1 time?](https://forums.unrealengine.com/t/make-array-pick-a-value-more-than-1-time/462998)

<div class="topic-metadata">

**Author:** [@Didgeridrew5](https://forums.unrealengine.com/u/Didgeridrew5)\
**Replies:** 3\
**Last updated:** [March 29, 2020, 10:09pm UTC](https://forums.unrealengine.com/t/make-array-pick-a-value-more-than-1-time/462998 "2020-03-29T22:09:06Z")

</div>

Hello, I have bushes in my game that you go through to spawn random animals depending on the level. Currently my blueprint only picks 1 animal from the array to spawn. I would like it to spawn 1 - 4 random animals. Not u…

---

## [How to make AI follow a random player (multiplayer)?](https://forums.unrealengine.com/t/how-to-make-ai-follow-a-random-player-multiplayer/461482)

<div class="topic-metadata">

**Author:** [@IntaxQ](https://forums.unrealengine.com/u/IntaxQ)\
**Replies:** 0\
**Last updated:** [February 8, 2020, 1:02am UTC](https://forums.unrealengine.com/t/how-to-make-ai-follow-a-random-player-multiplayer/461482 "2020-02-08T01:02:21Z")

</div>

I have tried those blueprints. AI only follows server or doesnt follow anyone. And it always shows “Fail” message (on fail node)

---

## [Elevator and Random Room Generator?](https://forums.unrealengine.com/t/elevator-and-random-room-generator/457180)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_4b8558d3](https://forums.unrealengine.com/u/anonymous_user_4b8558d3)\
**Replies:** 11\
**Last updated:** [October 24, 2019, 6:05pm UTC](https://forums.unrealengine.com/t/elevator-and-random-room-generator/457180 "2019-10-24T18:05:15Z")

</div>

Is there a way I could make an elevator go up or down and open up to a bunch of rooms randomly selected?

---

## [Interior Mapping Randomization](https://forums.unrealengine.com/t/interior-mapping-randomization/456595)

<div class="topic-metadata">

**Author:** [@DanielLye](https://forums.unrealengine.com/u/DanielLye)\
**Replies:** 1\
**Last updated:** [October 10, 2019, 9:19am UTC](https://forums.unrealengine.com/t/interior-mapping-randomization/456595 "2019-10-10T09:19:33Z")

</div>

Hello, So I have been following \[this\]\[1\] Interior Mapping tutorial, but right now I am at a roadblock. I am trying to randomize 3 things: Rotation of the Cubemap Lighting of the Room Level of the curtains I am tryi…

---

## [BP To Chose Random Item Spawn?](https://forums.unrealengine.com/t/bp-to-chose-random-item-spawn/456487)

<div class="topic-metadata">

**Author:** [@Jinkuu](https://forums.unrealengine.com/u/Jinkuu)\
**Replies:** 2\
**Last updated:** [October 6, 2019, 1:42am UTC](https://forums.unrealengine.com/t/bp-to-chose-random-item-spawn/456487 "2019-10-06T01:42:30Z")

</div>

I have an item that I want to spawn in designated areas around my level, I would like for this to be random so it will choose out of several locations where to spawn once it is picked up, I’m not really sure how to do th…

---

## [Premade rooms picking random locations](https://forums.unrealengine.com/t/premade-rooms-picking-random-locations/456357)

<div class="topic-metadata">

**Author:** [@Flame](https://forums.unrealengine.com/u/Flame)\
**Replies:** 3\
**Last updated:** [October 4, 2019, 5:08am UTC](https://forums.unrealengine.com/t/premade-rooms-picking-random-locations/456357 "2019-10-04T05:08:08Z")

</div>

hi everyone. I’m trying to create a sort of random placing of rooms in my game, but i’m probably making something stupid. If i don’t use for loops and just try one random from the list, it works, but using for loops or d…

---

## [Creating an automatic schedule for a group of teams in a league. (Similar to Football Manager)](https://forums.unrealengine.com/t/creating-an-automatic-schedule-for-a-group-of-teams-in-a-league-similar-to-football-manager/455442)

<div class="topic-metadata">

**Author:** [@Dread\_Fort](https://forums.unrealengine.com/u/Dread_Fort)\
**Replies:** 1\
**Last updated:** [September 16, 2019, 10:00pm UTC](https://forums.unrealengine.com/t/creating-an-automatic-schedule-for-a-group-of-teams-in-a-league-similar-to-football-manager/455442 "2019-09-16T22:00:11Z")

</div>

How would I go about doing this with Blueprint? I have a league of 9 teams, I will be giving each team their own actor blueprint to store variables such as wins, losses, players, elo, etc. From there I need to have a ran…

---

## [Add randomized elements to StringArray in BP](https://forums.unrealengine.com/t/add-randomized-elements-to-stringarray-in-bp/453446)

<div class="topic-metadata">

**Author:** [@linkings](https://forums.unrealengine.com/u/linkings)\
**Replies:** 1\
**Last updated:** [August 6, 2019, 4:28pm UTC](https://forums.unrealengine.com/t/add-randomized-elements-to-stringarray-in-bp/453446 "2019-08-06T16:28:28Z")

</div>

Contrary to the boxes to define what’s in the String Array, is there a way to auto-generate single elements with a random string out of an alphabet so there can be infinite combinations (and not only those 52 written in …

---

## [Question about storing repeated random integer values](https://forums.unrealengine.com/t/question-about-storing-repeated-random-integer-values/452482)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_4796e6ce](https://forums.unrealengine.com/u/anonymous_user_4796e6ce)\
**Replies:** 2\
**Last updated:** [July 20, 2019, 6:39am UTC](https://forums.unrealengine.com/t/question-about-storing-repeated-random-integer-values/452482 "2019-07-20T06:39:07Z")

</div>

Hello! I’m a newb here so would appreciate some sage advice - If I’m running a random integer function from 0 to 4 in order to choose from an array, and run the whole thing three times to get three results - 0, 2,1 1…

---

## [How can I create an array of heightmaps and randomize their rotation and position in the world to create a randomized landscape?](https://forums.unrealengine.com/t/how-can-i-create-an-array-of-heightmaps-and-randomize-their-rotation-and-position-in-the-world-to-create-a-randomized-landscape/448351)

<div class="topic-metadata">

**Author:** [@rgrthtrgr](https://forums.unrealengine.com/u/rgrthtrgr)\
**Replies:** 7\
**Last updated:** [May 7, 2019, 5:57pm UTC](https://forums.unrealengine.com/t/how-can-i-create-an-array-of-heightmaps-and-randomize-their-rotation-and-position-in-the-world-to-create-a-randomized-landscape/448351 "2019-05-07T17:57:44Z")

</div>

Hello, I am trying to figure out how I can make a pseudo randomized world. The way I was planning to do this is to create a bunch of heightmaps manually, and then generate a world from them. e.g randomly select 9 heig…

---

## [How to compare two elements in the same array](https://forums.unrealengine.com/t/how-to-compare-two-elements-in-the-same-array/444419)

<div class="topic-metadata">

**Author:** [@PerCat](https://forums.unrealengine.com/u/PerCat)\
**Replies:** 1\
**Last updated:** [March 1, 2019, 10:19pm UTC](https://forums.unrealengine.com/t/how-to-compare-two-elements-in-the-same-array/444419 "2019-03-01T22:19:25Z")

</div>

When an npc is generated they have a random id and their last name added to a struct which is then put into an array. How do I check those values against each other? Say its 310:Gray, 262:Covics, and 689:Gray, how would…

---

## [Moving landscape](https://forums.unrealengine.com/t/moving-landscape/442096)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_d54240d7](https://forums.unrealengine.com/u/anonymous_user_d54240d7)\
**Replies:** 0\
**Last updated:** [January 26, 2019, 1:55am UTC](https://forums.unrealengine.com/t/moving-landscape/442096 "2019-01-26T01:55:21Z")

</div>

im trying to make a open world island based game and wanted to have the islands spawn in random places so far ive try to make the landscape actor move to a Target point using add transform and get a warning saying i need…

[Next page](https://forums.unrealengine.com/tag/randomize-array/4551.md?match_all_tags=true&page=1&tags%5B%5D=randomize-array)
