# \#foreachloop

**URL:** https://forums.unrealengine.com/tag/foreachloop/2848.md

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

---

## [Get all actor of class with more than one objects](https://forums.unrealengine.com/t/get-all-actor-of-class-with-more-than-one-objects/2432575)

<div class="topic-metadata">

**Author:** [@Dr.Raven](https://forums.unrealengine.com/u/Dr.Raven)\
**Replies:** 2\
**Last updated:** [March 31, 2025, 8:31pm UTC](https://forums.unrealengine.com/t/get-all-actor-of-class-with-more-than-one-objects/2432575 "2025-03-31T20:31:31Z")

</div>

Hello everyone! I’ve run into the problem in my project that no matter how much I call Get all actor of class and then For each loop, it only marks one dropped object and not all of them. (in short, it’s a scanner that m…

---

## [How to Set multiple bools (to T or F) by using only 1 Set node?](https://forums.unrealengine.com/t/how-to-set-multiple-bools-to-t-or-f-by-using-only-1-set-node/1896961)

<div class="topic-metadata">

**Author:** [@XxNotAGamerxX](https://forums.unrealengine.com/u/XxNotAGamerxX)\
**Replies:** 0\
**Last updated:** [June 9, 2024, 11:58pm UTC](https://forums.unrealengine.com/t/how-to-set-multiple-bools-to-t-or-f-by-using-only-1-set-node/1896961 "2024-06-09T23:58:49Z")

</div>

I want an easy way to Set a list (Array) of Bools to True or False, by using only one Set node - so that I do not have to use a chain (list) of individually named Set nodes. Is it possible? I.e. I don’t want to have t…

---

## [Delay in the MIDDLE of a for loop](https://forums.unrealengine.com/t/delay-in-the-middle-of-a-for-loop/1889139)

<div class="topic-metadata">

**Author:** [@Izuuubito](https://forums.unrealengine.com/u/Izuuubito)\
**Replies:** 2\
**Last updated:** [June 7, 2024, 7:47am UTC](https://forums.unrealengine.com/t/delay-in-the-middle-of-a-for-loop/1889139 "2024-06-07T07:47:48Z")

</div>

SO I HAVE BUMPED INTO A HURDLE I want to execute a for loop with a delay, which isnt apparently possible by default. I know I could make a new macro, but here is a problem: I dont want the delay be at the beginning or e…

---

## [dynamic text content binding isnt working with for loop](https://forums.unrealengine.com/t/dynamic-text-content-binding-isnt-working-with-for-loop/1867672)

<div class="topic-metadata">

**Author:** [@HyperGameDev](https://forums.unrealengine.com/u/HyperGameDev)\
**Replies:** 2\
**Last updated:** [May 23, 2024, 5:20am UTC](https://forums.unrealengine.com/t/dynamic-text-content-binding-isnt-working-with-for-loop/1867672 "2024-05-23T05:20:02Z")

</div>

I’m working on a code that binds text content to an array of buttons on the settings menu to improve the user interface. When users hover over each button, the infotitle is supposed to change accordingly. My goal is to m…

---

## [Get All Actors Of Class not working with Decal Actor](https://forums.unrealengine.com/t/get-all-actors-of-class-not-working-with-decal-actor/412519)

<div class="topic-metadata">

**Author:** [@ForemanDesigns](https://forums.unrealengine.com/u/ForemanDesigns)\
**Replies:** 20\
**Last updated:** [May 19, 2024, 2:39pm UTC](https://forums.unrealengine.com/t/get-all-actors-of-class-not-working-with-decal-actor/412519 "2024-05-19T14:39:43Z")

</div>

I am trying to delete all decals in the level via a For Each Loop. I’m using the “Get All Actors Of Class” to attempt to find all decals but it doesn’t work - the debug log prints that it looped 0 times meaning it didn’…

---

## [Is there a built-in Epic Games solution to foreach TArray objects and call a function on them](https://forums.unrealengine.com/t/is-there-a-built-in-epic-games-solution-to-foreach-tarray-objects-and-call-a-function-on-them/1794149)

<div class="topic-metadata">

**Author:** [@gazee\_puk](https://forums.unrealengine.com/u/gazee_puk)\
**Replies:** 0\
**Last updated:** [April 8, 2024, 3:24pm UTC](https://forums.unrealengine.com/t/is-there-a-built-in-epic-games-solution-to-foreach-tarray-objects-and-call-a-function-on-them/1794149 "2024-04-08T15:24:27Z")

</div>

Hi, I was looking for a Epic Games method to foreach elements of a TArray container and call a specific function on them, but i can’t find one for TArray type. There are some similar functions such as ForEachObjectWithOu…

---

## [Unspecific error message - no way to get more accurate information?](https://forums.unrealengine.com/t/unspecific-error-message-no-way-to-get-more-accurate-information/1705741)

<div class="topic-metadata">

**Author:** [@riflatt-teg](https://forums.unrealengine.com/u/riflatt-teg)\
**Replies:** 4\
**Last updated:** [February 22, 2024, 2:07pm UTC](https://forums.unrealengine.com/t/unspecific-error-message-no-way-to-get-more-accurate-information/1705741 "2024-02-22T14:07:49Z")

</div>

Hello, I get the following error message in my output log: PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property CallFunc\_Array\_Get\_Item\_15". Node: Branch Graph: ForEachLoop Function: Execute U…

---

## [Something wrong with Enum ForEachLoop node](https://forums.unrealengine.com/t/something-wrong-with-enum-foreachloop-node/1581757)

<div class="topic-metadata">

**Author:** [@SimplestWay](https://forums.unrealengine.com/u/SimplestWay)\
**Replies:** 1\
**Last updated:** [January 3, 2024, 9:01am UTC](https://forums.unrealengine.com/t/something-wrong-with-enum-foreachloop-node/1581757 "2024-01-03T09:01:34Z")

</div>

I have a modular character and I want to set the modular parts in runtime, so I created an enum named “BodyType”, and then made a BodyType-SkeletalMesh map to store the mesh info. in my construct graph, I for loop …

---

## [For Each Loop followed by Set Timer by Event have strange behaviour](https://forums.unrealengine.com/t/for-each-loop-followed-by-set-timer-by-event-have-strange-behaviour/1500838)

<div class="topic-metadata">

**Author:** [@Draavec](https://forums.unrealengine.com/u/Draavec)\
**Replies:** 5\
**Last updated:** [December 7, 2023, 7:46pm UTC](https://forums.unrealengine.com/t/for-each-loop-followed-by-set-timer-by-event-have-strange-behaviour/1500838 "2023-12-07T19:46:47Z")

</div>

Hi All, I am quite new in Unreal but so far I was able to find solutions for my struggles. Unfortunately atm I am stuck. I am trying to run for each loop filled with elements from Multi Sphere Trace For Objects and for …

---

## [For each loop the option does not appear in blueprint](https://forums.unrealengine.com/t/for-each-loop-the-option-does-not-appear-in-blueprint/491144)

<div class="topic-metadata">

**Author:** [@FerminWeftARG](https://forums.unrealengine.com/u/FerminWeftARG)\
**Replies:** 25\
**Last updated:** [August 25, 2023, 7:21am UTC](https://forums.unrealengine.com/t/for-each-loop-the-option-does-not-appear-in-blueprint/491144 "2023-08-25T07:21:41Z")

</div>

s

---

## [ForEach over Enums](https://forums.unrealengine.com/t/foreach-over-enums/475306)

<div class="topic-metadata">

**Author:** [@MrCodyGaming](https://forums.unrealengine.com/u/MrCodyGaming)\
**Replies:** 8\
**Last updated:** [May 12, 2023, 11:00pm UTC](https://forums.unrealengine.com/t/foreach-over-enums/475306 "2023-05-12T23:00:45Z")

</div>

Hello Guys, I struggle to figure out how to do this as I’m still pretty new to C++ in general but I’m learning. I basically wanna do a foreach loop over my enums and using that to set A local enum to find a value in a …

---

## [ForEachLoop doesn't iterate all items](https://forums.unrealengine.com/t/foreachloop-doesnt-iterate-all-items/307692)

<div class="topic-metadata">

**Author:** [@Sentient](https://forums.unrealengine.com/u/Sentient)\
**Replies:** 3\
**Last updated:** [May 12, 2023, 2:20am UTC](https://forums.unrealengine.com/t/foreachloop-doesnt-iterate-all-items/307692 "2023-05-12T02:20:08Z")

</div>

I’m using a ForEachLoop to turn on Simulate Physics for all the children of the blueprint I’m working on. Problem is the loop always stops short of the last item. The loop will cover all items if I break the last connect…

---

## [How do I split AddUnique array - to Play Anim Montage once per index?](https://forums.unrealengine.com/t/how-do-i-split-addunique-array-to-play-anim-montage-once-per-index/1153758)

<div class="topic-metadata">

**Author:** [@XxNotAGamerxX](https://forums.unrealengine.com/u/XxNotAGamerxX)\
**Replies:** 0\
**Last updated:** [May 4, 2023, 3:03am UTC](https://forums.unrealengine.com/t/how-do-i-split-addunique-array-to-play-anim-montage-once-per-index/1153758 "2023-05-04T03:03:42Z")

</div>

UE4.27 Please help with the logic nodes. I do not understand how to process/split AddUnique arrays, to do something once per index, then remove that index so it can’t be used in the Loop again. I tried \[Do once\] or \[Re…

---

## [構造体の情報が書き換えられない](https://forums.unrealengine.com/t/topic/719299)

<div class="topic-metadata">

**Author:** [@SnelDev](https://forums.unrealengine.com/u/SnelDev)\
**Replies:** 0\
**Last updated:** [December 1, 2022, 12:59pm UTC](https://forums.unrealengine.com/t/topic/719299 "2022-12-01T12:59:16Z")

</div>

お世話になります。 構造体「Test」に構造体「Test2」の配列を持たせ、構造体の書き換えテストを行っています。 画像のようにBPを組んでみたのですが、プラスしたはずのZ軸がプラスされず、初期値のままで出力されてしまいます。構造体の中に構造体がある場合は情報を書き換えることができないのでしょうか？ ご教授頂けますと幸いです。

---

## [Anyone know how to do for loop in Niagara?](https://forums.unrealengine.com/t/anyone-know-how-to-do-for-loop-in-niagara/482136)

<div class="topic-metadata">

**Author:** [@intoxicat3](https://forums.unrealengine.com/u/intoxicat3)\
**Replies:** 9\
**Last updated:** [August 16, 2022, 9:01pm UTC](https://forums.unrealengine.com/t/anyone-know-how-to-do-for-loop-in-niagara/482136 "2022-08-16T21:01:55Z")

</div>

I’m trying to do simple for loop using vector array in Niagara module but can’t find a node corresponding to that. I also tried for loop using HLSL but it seems it’s always computing last index. Anyone was able to creat…

---

## [How to use ForEachLoop to remove items from array?](https://forums.unrealengine.com/t/how-to-use-foreachloop-to-remove-items-from-array/330106)

<div class="topic-metadata">

**Author:** [@TVinforest](https://forums.unrealengine.com/u/TVinforest)\
**Replies:** 6\
**Last updated:** [June 28, 2022, 9:54pm UTC](https://forums.unrealengine.com/t/how-to-use-foreachloop-to-remove-items-from-array/330106 "2022-06-28T21:54:01Z")

</div>

Hello! For example of problem I created a simple Blueprint - I’m adding some elements to empty Cell\_Array and then try to remove them all. But 1/2 of elements are still in Cell\_Array after all. How to remove elements …

---

## [Game actors in array are not following instructions in For Each Loop. (Activate and Deactivate Issues)](https://forums.unrealengine.com/t/game-actors-in-array-are-not-following-instructions-in-for-each-loop-activate-and-deactivate-issues/506609)

<div class="topic-metadata">

**Author:** [@ViRiX](https://forums.unrealengine.com/u/ViRiX)\
**Replies:** 20\
**Last updated:** [March 15, 2022, 10:02pm UTC](https://forums.unrealengine.com/t/game-actors-in-array-are-not-following-instructions-in-for-each-loop-activate-and-deactivate-issues/506609 "2022-03-15T22:02:59Z")

</div>

Hi, I am a bit new to UE, but am working on a game where you attract objects to you. That part works pretty good. I have a small platform that activates a power-up that allows the player to attract things from further …

---

## [What is FX?](https://forums.unrealengine.com/t/what-is-fx/337160)

<div class="topic-metadata">

**Author:** [@Harsit12](https://forums.unrealengine.com/u/Harsit12)\
**Replies:** 1\
**Last updated:** [October 22, 2018, 11:26am UTC](https://forums.unrealengine.com/t/what-is-fx/337160 "2018-10-22T11:26:19Z")

</div>

New in Forex? This market may sound actually sophisticated and scary to sort out but its not. Identical to in any kinds of trade, you make cash while you purchase low and promote high. Forex trading is just buying and s…

---

## [Create a new Row for each connected Player](https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_8bd91971](https://forums.unrealengine.com/u/anonymous_user_8bd91971)\
**Replies:** 2\
**Last updated:** [December 7, 2020, 11:47pm UTC](https://forums.unrealengine.com/t/create-a-new-row-for-each-connected-player/475475 "2020-12-07T23:47:17Z")

</div>

Hello, I’m trying to create a Scoreboard widget using a Grid Panel constructor, being Row 0 where the Placeholders will be, whilst on Row 1 it displays the stats for each player connected to server: And on widget BP …

---

## [Need Help with Collisions on Instanced Static Meshes](https://forums.unrealengine.com/t/need-help-with-collisions-on-instanced-static-meshes/475104)

<div class="topic-metadata">

**Author:** [@Nexis\_Design](https://forums.unrealengine.com/u/Nexis_Design)\
**Replies:** 0\
**Last updated:** [November 27, 2020, 10:08pm UTC](https://forums.unrealengine.com/t/need-help-with-collisions-on-instanced-static-meshes/475104 "2020-11-27T22:08:51Z")

</div>

https://i.imgur.com/8jOD5Fx.gif I’m trying to recreate an Ops Table like in Avatar. I’ve got the map moving and scaling. Right now it’s just hooked up to timelines but eventually I will connect it to player controller i…

---

## [Need help with string variable formatting](https://forums.unrealengine.com/t/need-help-with-string-variable-formatting/474102)

<div class="topic-metadata">

**Author:** [@Shedels](https://forums.unrealengine.com/u/Shedels)\
**Replies:** 9\
**Last updated:** [November 7, 2020, 8:38am UTC](https://forums.unrealengine.com/t/need-help-with-string-variable-formatting/474102 "2020-11-07T08:38:37Z")

</div>

I have string: 1234567890 How can i make it look like: 12 34 56 78 90?

---

## [ForEachloop only iterating last element](https://forums.unrealengine.com/t/foreachloop-only-iterating-last-element/362694)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_a10e8882](https://forums.unrealengine.com/u/anonymous_user_a10e8882)\
**Replies:** 4\
**Last updated:** [October 17, 2020, 12:20pm UTC](https://forums.unrealengine.com/t/foreachloop-only-iterating-last-element/362694 "2020-10-17T12:20:18Z")

</div>

Dear Dear All, I have been trying to get some basic understanding of all the blueprint nodes, but when trying to use the ForEachLoop i encounter a problem. In the blueprint i try to get one object named fadsf\* to move t…

---

## [For Each Loop does not use last index.](https://forums.unrealengine.com/t/for-each-loop-does-not-use-last-index/471723)

<div class="topic-metadata">

**Author:** [@NtinosFerret](https://forums.unrealengine.com/u/NtinosFerret)\
**Replies:** 1\
**Last updated:** [September 22, 2020, 12:44am UTC](https://forums.unrealengine.com/t/for-each-loop-does-not-use-last-index/471723 "2020-09-22T00:44:38Z")

</div>

I am trying to pass my saved slot names to their text boxes on loading a menu widget. 10 slots. All 9 work sweet. 10th does not show NO MATTER WHAT. Any ideas please? UPDATE: It seems like it is not even saving.

---

## [\[HELP\] Branch Always Fire False with loop](https://forums.unrealengine.com/t/help-branch-always-fire-false-with-loop/465570)

<div class="topic-metadata">

**Author:** [@HVS\_RHS](https://forums.unrealengine.com/u/HVS_RHS)\
**Replies:** 2\
**Last updated:** [May 21, 2020, 12:36pm UTC](https://forums.unrealengine.com/t/help-branch-always-fire-false-with-loop/465570 "2020-05-21T12:36:08Z")

</div>

Hello, My setup is as shown in picture below, somehow branch with foreachloop or any other loop is not working. It always gives false value even though i know both value are same and it should give me “true” print strin…

---

## [For each loop skips last index](https://forums.unrealengine.com/t/for-each-loop-skips-last-index/451709)

<div class="topic-metadata">

**Author:** [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Replies:** 5\
**Last updated:** [July 5, 2019, 9:54am UTC](https://forums.unrealengine.com/t/for-each-loop-skips-last-index/451709 "2019-07-05T09:54:58Z")

</div>

Hi there, I’ve got a parametric fuse box. I check the fuses sequence by comparing the state of each fuse and the target states. However with my setup the last fuse (last array index) keeps being skipped by the for each…

---

## [How to run the timeline in a foreachloop？](https://forums.unrealengine.com/t/how-to-run-the-timeline-in-a-foreachloop/451345)

<div class="topic-metadata">

**Author:** [@Anonymous\_431c8b5f6f6bec8fc955cb9610102647](https://forums.unrealengine.com/u/Anonymous_431c8b5f6f6bec8fc955cb9610102647)\
**Replies:** 2\
**Last updated:** [June 27, 2019, 6:32pm UTC](https://forums.unrealengine.com/t/how-to-run-the-timeline-in-a-foreachloop/451345 "2019-06-27T18:32:25Z")

</div>

I tried to moving location of actors by using timeline. When I was running the foreachloop before my timeline, the foreachloop ran for current times,but my timeline only finished once.

---

## [ForEachLoop on Server](https://forums.unrealengine.com/t/foreachloop-on-server/444062)

<div class="topic-metadata">

**Author:** [@xXKrusty](https://forums.unrealengine.com/u/xXKrusty)\
**Replies:** 1\
**Last updated:** [February 24, 2019, 11:16pm UTC](https://forums.unrealengine.com/t/foreachloop-on-server/444062 "2019-02-24T23:16:08Z")

</div>

So basically i have setup this simple blueprint to test something for my game. And now im wondering why the Server doenst do anything after an Loop through the Array… Heres the blueprint:

---

## [Play timeline inside ForEachLoop](https://forums.unrealengine.com/t/play-timeline-inside-foreachloop/442618)

<div class="topic-metadata">

**Author:** [@Steven991](https://forums.unrealengine.com/u/Steven991)\
**Replies:** 5\
**Last updated:** [February 3, 2019, 4:24pm UTC](https://forums.unrealengine.com/t/play-timeline-inside-foreachloop/442618 "2019-02-03T16:24:06Z")

</div>

Hi, I need to move n objects at the same time using 1 timeline, this to avoid copy-paste the same timeline n times for every object I need to move So this code is not going to work, cause from what I understand the t…

---

## [How do I refer to the last 10 objects of an array?](https://forums.unrealengine.com/t/how-do-i-refer-to-the-last-10-objects-of-an-array/441468)

<div class="topic-metadata">

**Author:** [@anonymous\_user\_c4414680](https://forums.unrealengine.com/u/anonymous_user_c4414680)\
**Replies:** 2\
**Last updated:** [January 16, 2019, 11:28pm UTC](https://forums.unrealengine.com/t/how-do-i-refer-to-the-last-10-objects-of-an-array/441468 "2019-01-16T23:28:35Z")

</div>

Use array Length - 10 As Last Index

---

## [Setting a ForEachLoop to return a certain value if only one variable out of an array is true](https://forums.unrealengine.com/t/setting-a-foreachloop-to-return-a-certain-value-if-only-one-variable-out-of-an-array-is-true/440213)

<div class="topic-metadata">

**Author:** [@Noodle\_Games](https://forums.unrealengine.com/u/Noodle_Games)\
**Replies:** 5\
**Last updated:** [December 28, 2018, 8:06am UTC](https://forums.unrealengine.com/t/setting-a-foreachloop-to-return-a-certain-value-if-only-one-variable-out-of-an-array-is-true/440213 "2018-12-28T08:06:20Z")

</div>

Make it into a function and have the function return true Boolean if it is true and return false on Completed otherwise. Note that using GetAllActorsOfClass on Event Tick in a Blueprint is probably one of the worst thin…

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