# For each loop in anim graph

**URL:** <https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391>\
**Category:** Character & Animation\
**Tags:** for-loop, unreal-engine, question\
**Created:** [March 12, 2020, 3:02pm UTC](https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391 "2020-03-12T15:02:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max974](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Max974](https://forums.unrealengine.com/u/Max974)\
**Post date:** [March 12, 2020, 3:02pm UTC](https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391/1 "2020-03-12T15:02:30Z")

</div>

Hello, how can I make a for each loop in an anim graph to avoid things like this :

 ![297752-unknown.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/f/84f71c8374539a6c575499ce4de022594423388d.png)

---

<div class="post-metadata">

**Author:** ![anon75864172](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon75864172](https://forums.unrealengine.com/u/anon75864172)\
**Post date:** [April 11, 2022, 10:09am UTC](https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391/2 "2022-04-11T10:09:21Z")

</div>

I will be waiting for the answer for my same question…

---

<div class="post-metadata">

**Author:** ![lucota90](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lucota90](https://forums.unrealengine.com/u/lucota90)\
**Post date:** [May 4, 2022, 1:27am UTC](https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391/3 "2022-05-04T01:27:13Z")

</div>

Yeah 😕 so sad to see I can’t control bone with arrays

---

<div class="post-metadata">

**Author:** ![anon75864172](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon75864172](https://forums.unrealengine.com/u/anon75864172)\
**Post date:** [May 5, 2022, 2:45am UTC](https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391/4 "2022-05-05T02:45:20Z")

</div>

Up till now, it seems the only way to do so is to write a customized animation node with C++.

I have been doing so by modifying the source code of the Modify Bone node. The only problem unsolved is the mapping between the bone name (a string) to the actual bone in the code. By adding a for loop, and define the bone to modify as well as the transformations, we can reuse the code of the Modify Bone node.

---

<div class="post-metadata">

**Author:** ![HAYTHAM\_KENWAY](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HAYTHAM\_KENWAY](https://forums.unrealengine.com/u/HAYTHAM_KENWAY)\
**Post date:** [October 26, 2024, 11:04am UTC](https://forums.unrealengine.com/t/for-each-loop-in-anim-graph/462391/5 "2024-10-26T11:04:09Z")

</div>

Is there a better way built in (blueprints)?
