Cannot connect For each loop array element to target

I have tried all sorts of “solutions” but this is killing me - why is it impossible to connect the two…any help apprecaied thx

Try selecting the loop node, right-clicking it, and selecting “Refresh Node”. ForEach loops won’t update their output element type when you change the input array type.

I bet you made the GetAllActors node, then connected the ForEach loop, then changed the Actor Class.

Thx…but still having difficulty…am I missing something important here in my setup?

The pins, wires and nodes ate context sensitive and prevent you from making mistakes.

If you plop down an isolated node first and then try to connect it, you may attempt things that make little sense in this context.

Drag a wire from the Array Element pin first, and only then search in the box that pops up. Try working with Context Senstive enabled (upper right corner of said box) - especially when you’re still exploring things.

Thx. Perhaps I’m framing my question wrong…In my mind the logic seems straightforward, namely select an actor in class (with tag) and for each array element perform the given command…but no matter how (context or not) try to connect from the array element to the target it will not let me…so is there another way of setting the intensity etc of multiple lights after tagging them?

That’s precisely what I suggested you do not do. Do not try to connect wires to some random nodes that were placed in the graph with no context; search for a valid element instead:

Use the wires to place nodes. Don’t just place nodes (unless you know exactly what you need). This will prevent you from running into situations like this.

Also, highlighting pins (here Array Element) tells you their type:


Do these 2 match on your end?

Once again thx for helping…I feel like a dunce! but why is my drop down not showing my options?

You have no class in the dropdown. Choose a class, reconnect Out Actors to For Each (alt+click to disconnect), and then search.

Assuming the actor has a component named so and so, ofc:

Admittedly, there are things blueprints don’t explain well (I’ve never seen it explained, at least):


You can observe this behaviour on many nodes. If you connect the data wire first before you select the class, the ForEach type will be set to default even though you choose a class later on.

I believe this the correct, indented behaviour; you may want it work like this in some situations. It can be just confusing.

What is the type of the Array Element when you mouse over it? See my posts above explaining it.

Actor object reference

Explained here:

Choose a class, reconnect Out Actors to For Each (alt+click to disconnect), and then search.

You must do it in this order. Instead you connected the wire first and then chose the class. Details at the bottom of this post:

In short, choose class first:

Otherwise you’ll get a generic actor type.

Nope! Order: last one comes first

Disconnect all. Choose Class, connect pins: Out ActorsArray. Check type of Array Element.

  1. Delete the “For Each Loop” node
  2. Set the “Actor Class” in the “Get All Actors of Class with Tag” node
  3. Drag from “out Actors” and start typing “For Each…” and select the contextual “For Each Loop” node
  4. Profit

Thank you all for your help!

1 Like