Announcement

Collapse
No announcement yet.

Issue in addressing multiple elements of an actor when using DIM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Click image for larger version

Name:	2017-02-23.png
Views:	1
Size:	200.2 KB
ID:	1211841

    Click image for larger version

Name:	2017-02-23 (1).png
Views:	1
Size:	288.0 KB
ID:	1211842

    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

    #2
    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

    Comment


      #3
      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.

      Click image for larger version

Name:	2017-02-24.png
Views:	1
Size:	530.0 KB
ID:	1123925

      Thanks for the reply

      Comment

      Working...
      X