Issue in addressing multiple elements of an actor when using DIM

Hi all.

I have a question using blueprints. I created this blueprint for an actor and I want to apply a Dynamic Material Instance on it. This actor has 9 elements and I want this material to be applied on all these 9 elements.

I have tried in getting access to all these 9 elements with a for loop but apparently only one is being selected.

You can see that on my blueprints below for my construction script and event graph. As you will see my input comes from an Arduino but that works ok.

I have used on another project a for loop to address multiple elements of an actor on a different project but that was through the level blueprints. I am still new to blueprints and I lack the basic knowledge in understanding the way they communicate.

Any help would be greatly appreciated.
Thank you

You kind of messed whole code.

  • first create single instanced material. Can be done in editor or blueprint
  • then make dynamic material instance out of that instanced material, remember its pointer (blue pin output)
  • then in for loop 0 to 8 set that static mesh materials to dynamic material
  • and then you can change that dynamic instanced material parameters

Solved it. Here is my blueprint(Had to switch to level blueprints in order to achieve it though). Quite simple but took me a while to understand it.

Thanks for the reply